diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-30 22:44:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-30 22:44:18 +0200 |
commit | 64b25938e90253432d28ffd7d971f085c560a523 (patch) | |
tree | 56ba6a39d7e8f14ebccdcc4db935164b5da624a2 /cmdutils.c | |
parent | be24f85176d8e46c3154f1f51013f235b273183e (diff) | |
parent | ceabc13f129cd6344b1eebdbe10119083fe5520e (diff) | |
download | ffmpeg-64b25938e90253432d28ffd7d971f085c560a523.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
dsputilenc_mmx: split assignment of ff_sse16_sse2 to SSE2 section.
dnxhdenc: add space between function argument type and comment.
x86: fmtconvert: add special asm for float_to_int16_interleave_misc_*
attributes: Add a definition of av_always_inline for MSVC
cmdutils: Pass the actual chosen encoder to filter_codec_opts
os_support: Add fallback definitions for stat flags
os_support: Rename the poll fallback function to ff_poll
network: Check for struct pollfd
os_support: Don't compare a negative number against socket descriptors
os_support: Include all the necessary headers for the win32 open function
x86: vc1: fix and enable optimised loop filter
Conflicts:
cmdutils.c
cmdutils.h
ffmpeg.c
ffplay.c
libavformat/os_support.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cmdutils.c b/cmdutils.c index 557e1a601f..36f82c94bf 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1135,8 +1135,8 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) return AVERROR(EINVAL); } -AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec, - AVFormatContext *s, AVStream *st) +AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, + AVFormatContext *s, AVStream *st, AVCodec *codec) { AVDictionary *ret = NULL; AVDictionaryEntry *t = NULL; @@ -1146,6 +1146,9 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec, const AVClass *cc = avcodec_get_class(); if (!codec) + codec = s->oformat ? avcodec_find_encoder(codec_id) + : avcodec_find_decoder(codec_id); + if (!codec) return NULL; switch (codec->type) { @@ -1205,8 +1208,8 @@ AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, return NULL; } for (i = 0; i < s->nb_streams; i++) - opts[i] = filter_codec_opts(codec_opts, avcodec_find_decoder(s->streams[i]->codec->codec_id), - s, s->streams[i]); + opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, + s, s->streams[i], NULL); return opts; } |