x264enc: get_caps function should return a copy of the caps
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 3 May 2011 13:57:16 +0000 (14:57 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 3 May 2011 14:24:15 +0000 (15:24 +0100)
ext/x264/gstx264enc.c

index 098b41f..59d1f4e 100644 (file)
@@ -1466,7 +1466,7 @@ gst_x264_enc_sink_get_caps (GstPad * pad)
 
   /* If we already have caps return them */
   if (GST_PAD_CAPS (pad))
-    return GST_PAD_CAPS (pad);
+    return gst_caps_copy (GST_PAD_CAPS (pad));
 
   encoder = GST_X264_ENC (gst_pad_get_parent (pad));
   if (!encoder)