deinterlace: use separate buffer metadata for fields
authorDavid Schleef <ds@schleef.org>
Mon, 23 Aug 2010 04:15:07 +0000 (21:15 -0700)
committerDavid Schleef <ds@schleef.org>
Mon, 23 Aug 2010 09:51:24 +0000 (02:51 -0700)
Call gst_buffer_make_metadata_writable() on buffers that are
duplicated into fields.  Fixes #627689.

gst/deinterlace/gstdeinterlace.c

index 6d2a470..7c1ffc4 100644 (file)
@@ -805,15 +805,15 @@ gst_deinterlace_push_history (GstDeinterlace * self, GstBuffer * buffer)
 
   if (field_layout == GST_DEINTERLACE_LAYOUT_TFF) {
     GST_DEBUG_OBJECT (self, "Top field first");
-    field1 = gst_buffer_ref (buffer);
+    field1 = gst_buffer_make_metadata_writable (gst_buffer_ref (buffer));
     field1_flags = PICTURE_INTERLACED_TOP;
-    field2 = gst_buffer_ref (buffer);
+    field2 = gst_buffer_make_metadata_writable (gst_buffer_ref (buffer));
     field2_flags = PICTURE_INTERLACED_BOTTOM;
   } else {
     GST_DEBUG_OBJECT (self, "Bottom field first");
-    field1 = gst_buffer_ref (buffer);
+    field1 = gst_buffer_make_metadata_writable (gst_buffer_ref (buffer));
     field1_flags = PICTURE_INTERLACED_BOTTOM;
-    field2 = gst_buffer_ref (buffer);
+    field2 = gst_buffer_make_metadata_writable (gst_buffer_ref (buffer));
     field2_flags = PICTURE_INTERLACED_TOP;
   }