[SCM] libav/experimental: Add missing NULL checks, fix crash.

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


The following commit has been merged in the experimental branch:
commit 120119225a5363f89822addb472085631d2157bc
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date:   Fri Sep 24 20:01:38 2010 +0000

    Add missing NULL checks, fix crash.
    
    Originally committed as revision 25181 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c
index 7e44901..cb9ed19 100644
--- a/libavfilter/defaults.c
+++ b/libavfilter/defaults.c
@@ -282,8 +282,8 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
 
 int avfilter_default_query_formats(AVFilterContext *ctx)
 {
-    enum AVMediaType type = ctx->inputs [0] ? ctx->inputs [0]->type :
-                            ctx->outputs[0] ? ctx->outputs[0]->type :
+    enum AVMediaType type = ctx->inputs  && ctx->inputs [0] ? ctx->inputs [0]->type :
+                            ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
                             AVMEDIA_TYPE_VIDEO;
 
     avfilter_set_common_formats(ctx, avfilter_all_formats(type));

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list