mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-13 12:34:26 +08:00
fftools/ffmpeg_mux_init: do not call av{codec,format}_get_class() repeatedly
This commit is contained in:
@@ -1727,6 +1727,8 @@ static int set_dispositions(OutputFile *of, AVFormatContext *ctx)
|
|||||||
|
|
||||||
static void validate_enc_avopt(const Muxer *mux, const AVDictionary *codec_avopt)
|
static void validate_enc_avopt(const Muxer *mux, const AVDictionary *codec_avopt)
|
||||||
{
|
{
|
||||||
|
const AVClass *class = avcodec_get_class();
|
||||||
|
const AVClass *fclass = avformat_get_class();
|
||||||
const OutputFile *of = &mux->of;
|
const OutputFile *of = &mux->of;
|
||||||
|
|
||||||
AVDictionary *unused_opts;
|
AVDictionary *unused_opts;
|
||||||
@@ -1742,10 +1744,8 @@ static void validate_enc_avopt(const Muxer *mux, const AVDictionary *codec_avopt
|
|||||||
|
|
||||||
e = NULL;
|
e = NULL;
|
||||||
while ((e = av_dict_get(unused_opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
|
while ((e = av_dict_get(unused_opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
const AVClass *class = avcodec_get_class();
|
|
||||||
const AVOption *option = av_opt_find(&class, e->key, NULL, 0,
|
const AVOption *option = av_opt_find(&class, e->key, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
|
||||||
const AVClass *fclass = avformat_get_class();
|
|
||||||
const AVOption *foption = av_opt_find(&fclass, e->key, NULL, 0,
|
const AVOption *foption = av_opt_find(&fclass, e->key, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
|
||||||
if (!option || foption)
|
if (!option || foption)
|
||||||
|
Reference in New Issue
Block a user