diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-25 05:31:59 +0400 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-25 05:31:59 +0400 |
commit | 20e021c7119f7bd54c4333eca7167efb097deffd (patch) | |
tree | 2f3abb87c642f83d6808d389bba31b1b7b949226 /cmdutils.c | |
parent | 75b67a8a99202321e9241e29c98c633a1b20846b (diff) |
Add more missing checks in opt_default(), prevent a crash if
avcodec_opts[0] or avformat_opts is not set.
Originally committed as revision 25186 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c index 4a643aed24..762537aa75 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -230,7 +230,7 @@ int opt_default(const char *opt, const char *arg){ opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1)); opt_names[opt_name_count++]= o->name; - if(avcodec_opts[0]->debug || avformat_opts->debug) + if ((*avcodec_opts && avcodec_opts[0]->debug) || (avformat_opts && avformat_opts->debug)) av_log_set_level(AV_LOG_DEBUG); return 0; } |