When inserting a filter, don't lose any information we may already have
authorVitor Sessak <vitor1001@gmail.com>
Fri, 15 Feb 2008 21:39:28 +0000 (21:39 +0000)
committerVitor Sessak <vitor1001@gmail.com>
Fri, 15 Feb 2008 21:39:28 +0000 (21:39 +0000)
about the colorspaces supported across the link.

Commited in SoC by Bobby Bingham on 2007-12-20 20:47:11

Originally committed as revision 12028 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/avfilter.c

index 3de6ebf50737071431183e604cc0a4657dd4f0eb..53ca8310262f3a622fa3f679fac757b6d4d123e4 100644 (file)
@@ -114,6 +114,13 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
     link->dstpad = in;
     filt->inputs[in] = link;
 
+    /* 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;
+    }
+
     return 0;
 }