Skip to content
Snippets Groups Projects
Commit 20e021c7 authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

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
parent 75b67a8a
No related branches found
No related tags found
No related merge requests found
...@@ -230,7 +230,7 @@ int opt_default(const char *opt, const char *arg){ ...@@ -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= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1));
opt_names[opt_name_count++]= o->name; 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); av_log_set_level(AV_LOG_DEBUG);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment