Browse Source

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
tags/n0.8
Stefano Sabatini 15 years ago
parent
commit
20e021c711
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      cmdutils.c

+ 1
- 1
cmdutils.c View File

@@ -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;
}


Loading…
Cancel
Save