From: Michael Olbrich Date: Tue, 14 May 2013 10:03:03 +0000 (+0200) Subject: v4l2: copy and set the actual size of the content X-Git-Tag: 1.1.1~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16b0fd5ad913be2458f38c06707ce66b14fe4fb9;p=platform%2Fupstream%2Fgst-plugins-good.git v4l2: copy and set the actual size of the content https://bugzilla.gnome.org/show_bug.cgi?id=700282 --- diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 054505d..65d17c4 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -2551,9 +2551,9 @@ gst_v4l2_object_copy (GstV4l2Object * v4l2object, GstBuffer * dest, GST_DEBUG_OBJECT (v4l2object->element, "copy raw bytes"); gst_buffer_map (src, &map, GST_MAP_READ); - gst_buffer_fill (dest, 0, map.data, map.size); + gst_buffer_fill (dest, 0, map.data, gst_buffer_get_size (src)); gst_buffer_unmap (src, &map); - gst_buffer_resize (dest, 0, map.size); + gst_buffer_resize (dest, 0, gst_buffer_get_size (src)); } GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, v4l2object->element, "slow copy into buffer %p", dest);