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

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


Author: mru
Date: Sat Aug  7 00:25:33 2010
New Revision: 24718

Log:
avfilter: free link in/out_formats in avfilter_destroy()

Modified:
   trunk/libavfilter/avfilter.c

Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c	Fri Aug  6 20:57:14 2010	(r24717)
+++ trunk/libavfilter/avfilter.c	Sat Aug  7 00:25:33 2010	(r24718)
@@ -428,13 +428,19 @@ void avfilter_destroy(AVFilterContext *f
         filter->filter->uninit(filter);
 
     for(i = 0; i < filter->input_count; i ++) {
-        if(filter->inputs[i])
+        if(filter->inputs[i]) {
             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);
+        }
         av_freep(&filter->inputs[i]);
     }
     for(i = 0; i < filter->output_count; i ++) {
-        if(filter->outputs[i])
+        if(filter->outputs[i]) {
             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);
+        }
         av_freep(&filter->outputs[i]);
     }
 



More information about the ffmpeg-cvslog mailing list