mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
asfdemux: perform writable buffer map to copy into it
This commit is contained in:
parent
0bc76c0d03
commit
96030c3b09
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue