[0.11] gst-plugins-ugly: asfdemux: perform writable buffer map to copy into it

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Fri Jan 13 07:02:01 PST 2012


Module: gst-plugins-ugly
Branch: 0.11
Commit: 96030c3b09b02188c214eba841bfcd0e2e7eeb64
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=96030c3b09b02188c214eba841bfcd0e2e7eeb64

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Fri Jan 13 15:56:25 2012 +0100

asfdemux: perform writable buffer map to copy into it

---

 gst/asfdemux/gstasfdemux.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 1fa4e90..5434283 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -3697,15 +3697,14 @@ gst_asf_demux_process_object (GstASFDemux * demux, guint8 ** p_data,
     case ASF_OBJ_EXTENDED_STREAM_PROPS:{
       GstBuffer *buf;
       gpointer data;
-      gsize size;
 
       /* process these later, we might not have parsed the corresponding
        * stream object yet */
       GST_LOG ("%s: queued for later parsing", demux->objpath);
       buf = gst_buffer_new_and_alloc (obj_data_size);
-      data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
+      data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE);
       memcpy (data, *p_data, obj_data_size);
-      gst_buffer_unmap (buf, data, size);
+      gst_buffer_unmap (buf, data, -1);
       demux->ext_stream_props = g_slist_append (demux->ext_stream_props, buf);
       ret = GST_FLOW_OK;
       break;



More information about the gstreamer-commits mailing list