diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-27 21:17:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-27 21:17:56 +0100 |
commit | 6d13499be04a610b6ce4c445eac768244ee04d64 (patch) | |
tree | 369940f19a4f83b5a7eec7d5cf2f044de6f84339 /cmdutils.c | |
parent | e99c4bbdf3ddaf8d68c8eb882eda2c2c36219235 (diff) | |
download | ffmpeg-6d13499be04a610b6ce4c445eac768244ee04d64.tar.gz |
cmdutils: pass AVCodec to filter_codec_opts()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmdutils.c b/cmdutils.c index daca802181..62c87cb6b6 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -945,11 +945,10 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) return AVERROR(EINVAL); } -AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, AVFormatContext *s, AVStream *st) +AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec, AVFormatContext *s, AVStream *st) { AVDictionary *ret = NULL; AVDictionaryEntry *t = NULL; - AVCodec *codec = s->oformat ? avcodec_find_encoder(codec_id) : avcodec_find_decoder(codec_id); int flags = s->oformat ? AV_OPT_FLAG_ENCODING_PARAM : AV_OPT_FLAG_DECODING_PARAM; char prefix = 0; const AVClass *cc = avcodec_get_class(); @@ -999,7 +998,7 @@ AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *cod return NULL; } for (i = 0; i < s->nb_streams; i++) - opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, s, s->streams[i]); + opts[i] = filter_codec_opts(codec_opts, avcodec_find_decoder(s->streams[i]->codec->codec_id), s, s->streams[i]); return opts; } |