[FFmpeg-cvslog] r25186 - trunk/cmdutils.c

stefano subversion
Sat Sep 25 03:31:59 CEST 2010


Author: stefano
Date: Sat Sep 25 03:31:59 2010
New Revision: 25186

Log:
Add more missing checks in opt_default(), prevent a crash if
avcodec_opts[0] or avformat_opts is not set.

Modified:
   trunk/cmdutils.c

Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c	Sat Sep 25 03:18:43 2010	(r25185)
+++ trunk/cmdutils.c	Sat Sep 25 03:31:59 2010	(r25186)
@@ -230,7 +230,7 @@ int opt_default(const char *opt, const c
     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;
 }



More information about the ffmpeg-cvslog mailing list