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

vitor subversion
Fri Feb 15 22:39:32 CET 2008


Author: vitor
Date: Fri Feb 15 22:39:32 2008
New Revision: 12029

Log:
Need to be careful when dealing with references.

Commited in SoC by Bobby Bingham on 2007-12-20 23:38:49


Modified:
   trunk/libavfilter/avfilter.c

Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c	(original)
+++ trunk/libavfilter/avfilter.c	Fri Feb 15 22:39:32 2008
@@ -99,6 +99,8 @@ int avfilter_link(AVFilterContext *src, 
 int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
                            unsigned in, unsigned out)
 {
+    AVFilterFormats *formats;
+
     av_log(NULL, AV_LOG_INFO, "auto-inserting filter '%s'\n",
             filt->filter->name);
 
@@ -116,10 +118,9 @@ int avfilter_insert_filter(AVFilterLink 
 
     /* if any information on supported colorspaces already exists on the
      * link, we need to preserve that */
-    if(link->out_formats) {
-        filt->outputs[out]->out_formats = link->out_formats;
-        link->out_formats = NULL;
-    }
+    if((formats = link->out_formats))
+        avfilter_formats_changeref(&link->out_formats,
+                                   &filt->outputs[out]->out_formats);
 
     return 0;
 }




More information about the ffmpeg-cvslog mailing list