diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-03-07 08:34:52 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-03-07 08:34:52 +0000 |
commit | 2d0aefd62608e1cc9a804bbd4eee68e0f10c5626 (patch) | |
tree | f48b5ea6273565bb816d2ce4824af73d6ee75a18 /ffmpeg.c | |
parent | 289a8e4d2818c551ea73d97885641306e17ce869 (diff) | |
download | ffmpeg-streaming-2d0aefd62608e1cc9a804bbd4eee68e0f10c5626.zip ffmpeg-streaming-2d0aefd62608e1cc9a804bbd4eee68e0f10c5626.tar.gz |
only store command line parameters in contexts with matching codec_type
Originally committed as revision 8282 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -3507,9 +3507,14 @@ static void show_version(void) static int opt_default(const char *opt, const char *arg){ int type; - const AVOption *o; - for(type=0; type<CODEC_TYPE_NB; type++) - o = av_set_string(avctx_opts[type], opt, arg); + const AVOption *o= NULL; + int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; + + for(type=0; type<CODEC_TYPE_NB; type++){ + const AVOption *o2 = av_find_opt(avctx_opts[0], opt, NULL, opt_types[type], opt_types[type]); + if(o2) + o = av_set_string(avctx_opts[type], opt, arg); + } if(!o) o = av_set_string(avformat_opts, opt, arg); if(!o){ |