use gst_caps_merge instead of gst_caps_union
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 13 Mar 2012 08:54:14 +0000 (09:54 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 13 Mar 2012 08:54:14 +0000 (09:54 +0100)
ext/resindvd/rsndec.c

index 662e932..788857a 100644 (file)
@@ -201,14 +201,11 @@ rsndec_factory_filter (GstPluginFeature * feature, RsnDecFactoryFilterCtx * ctx)
 
       /* check if the intersection is empty */
       if (!gst_caps_is_empty (intersect)) {
-        GstCaps *new_dec_caps;
         /* non empty intersection, we can use this element */
         can_sink = TRUE;
-        new_dec_caps = gst_caps_union (ctx->decoder_caps, intersect);
-        gst_caps_unref (ctx->decoder_caps);
-        ctx->decoder_caps = new_dec_caps;
-      }
-      gst_caps_unref (intersect);
+        ctx->decoder_caps = gst_caps_merge (ctx->decoder_caps, intersect);
+      } else
+        gst_caps_unref (intersect);
     }
   }