fix for caps api changes
authorWim Taymans <wim.taymans@collabora.co.uk>
Sun, 11 Mar 2012 18:07:31 +0000 (19:07 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Sun, 11 Mar 2012 18:07:31 +0000 (19:07 +0100)
ext/ffmpeg/gstffmpegenc.c
ext/libswscale/gstffmpegscale.c

index 9388e09..df420a5 100644 (file)
@@ -315,7 +315,7 @@ gst_ffmpegenc_finalize (GObject * object)
 
 static GstCaps *
 gst_ffmpegenc_get_possible_sizes (GstFFMpegEnc * ffmpegenc, GstPad * pad,
-    const GstCaps * caps)
+    GstCaps * caps)
 {
   GstCaps *othercaps = NULL;
   GstCaps *tmpcaps = NULL;
@@ -357,7 +357,8 @@ gst_ffmpegenc_get_possible_sizes (GstFFMpegEnc * ffmpegenc, GstPad * pad,
       gst_structure_set_value (tmps, "height", height);
     if (framerate)
       gst_structure_set_value (tmps, "framerate", framerate);
-    gst_caps_merge_structure (tmpcaps, tmps);
+
+    tmpcaps = gst_caps_merge_structure (tmpcaps, tmps);
   }
   gst_caps_unref (intersect);
 
index a987f10..ae5fb83 100644 (file)
@@ -311,14 +311,14 @@ gst_ffmpegscale_transform_caps (GstBaseTransform * trans,
       "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
       "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
 
-  gst_caps_merge_structure (ret, gst_structure_copy (structure));
+  ret = gst_caps_merge_structure (ret, gst_structure_copy (structure));
 
   /* if pixel aspect ratio, make a range of it */
   if ((par = gst_structure_get_value (structure, "pixel-aspect-ratio"))) {
     gst_structure_set (structure,
         "pixel-aspect-ratio", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
 
-    gst_caps_merge_structure (ret, structure);
+    ret = gst_caps_merge_structure (ret, structure);
   } else {
     gst_structure_free (structure);
   }