imagefreeze: replace with gst_buffer_copy
authorVineeth T M <vineeth.tm@samsung.com>
Tue, 2 Sep 2014 11:52:07 +0000 (17:22 +0530)
committerThiago Santos <thiagoss@osg.samsung.com>
Thu, 4 Sep 2014 00:33:09 +0000 (21:33 -0300)
gst_buffer_ref and gst_buffer_writable is being used to create a writable copy of source buffer.

replacing the same with gst_buffer_copy as the functionality is same.

https://bugzilla.gnome.org/show_bug.cgi?id=735880

gst/imagefreeze/gstimagefreeze.c

index 1a0c73a3fde3b3195e3378289f55ed116d79e634..0d6ab60b4bede2b4659d847414fc9a000ab8e8d8 100644 (file)
@@ -706,8 +706,8 @@ gst_image_freeze_src_loop (GstPad * pad)
     g_mutex_unlock (&self->lock);
     goto pause_task;
   }
-  buffer = gst_buffer_ref (self->buffer);
-  buffer = gst_buffer_make_writable (buffer);
+  buffer = gst_buffer_copy (self->buffer);
+
   g_mutex_unlock (&self->lock);
 
   if (self->need_segment) {