diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-24 20:32:08 +0400 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-24 20:32:08 +0400 |
commit | d860aaf8cd1ff566f4587643bf3cd7cf713f4c32 (patch) | |
tree | 73d092399f1c75fac9ad9ab74ed0be5e5a68bc5f /cmdutils.c | |
parent | d7cd001ff2e54052d8c3017eac32977ec52403f8 (diff) |
Add missing existence checks in opt_default().
Originally committed as revision 25179 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c index 382c6c1809..4a643aed24 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -198,12 +198,12 @@ int opt_default(const char *opt, const char *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<AVMEDIA_TYPE_NB && ret>= 0; type++){ + for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){ const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]); if(o2) ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o); } - if(!o) + if(!o && avformat_opts) ret = av_set_string3(avformat_opts, opt, arg, 1, &o); if(!o && sws_opts) ret = av_set_string3(sws_opts, opt, arg, 1, &o); |