[FFmpeg-cvslog] r24719 - trunk/libavfilter/avfilter.c

mru subversion
Sat Aug 7 00:25:37 CEST 2010


Author: mru
Date: Sat Aug  7 00:25:36 2010
New Revision: 24719

Log:
avfilter: do not crash on null link src/dst in avfilter_destroy()

Modified:
   trunk/libavfilter/avfilter.c

Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c	Sat Aug  7 00:25:33 2010	(r24718)
+++ trunk/libavfilter/avfilter.c	Sat Aug  7 00:25:36 2010	(r24719)
@@ -429,6 +429,7 @@ void avfilter_destroy(AVFilterContext *f
 
     for(i = 0; i < filter->input_count; i ++) {
         if(filter->inputs[i]) {
+            if (filter->inputs[i]->src)
             filter->inputs[i]->src->outputs[filter->inputs[i]->srcpad] = NULL;
             avfilter_formats_unref(&filter->inputs[i]->in_formats);
             avfilter_formats_unref(&filter->inputs[i]->out_formats);
@@ -437,6 +438,7 @@ void avfilter_destroy(AVFilterContext *f
     }
     for(i = 0; i < filter->output_count; i ++) {
         if(filter->outputs[i]) {
+            if (filter->outputs[i]->dst)
             filter->outputs[i]->dst->inputs[filter->outputs[i]->dstpad] = NULL;
             avfilter_formats_unref(&filter->outputs[i]->in_formats);
             avfilter_formats_unref(&filter->outputs[i]->out_formats);



More information about the ffmpeg-cvslog mailing list