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

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:16:09 UTC 2013


The following commit has been merged in the experimental branch:
commit 20e021c7119f7bd54c4333eca7167efb097deffd
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date:   Sat Sep 25 01:31:59 2010 +0000

    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

diff --git a/cmdutils.c b/cmdutils.c
index 4a643ae..762537a 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;
 }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list