diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-01-06 13:06:32 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-01-06 13:06:32 +0100 |
commit | 0f6ca2afe4bbfb99094c5f58894ea368c2c52dff (patch) | |
tree | 0a56edc799327149bd5fc2f2412048269c0a9395 | |
parent | 220b324d24bdbc987e1048535e4171b1998fc0e6 (diff) |
queue2: unmap with the right data pointer
Use the original data pointer to unmap the buffer memory.
-rw-r--r-- | plugins/elements/gstqueue2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index 452d40cc6..1a2ba1783 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -1152,7 +1152,7 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length, GstBuffer ** buffer) { GstBuffer *buf; - guint8 *data; + guint8 *data, *orig; guint64 file_offset; guint block_length, remaining, read_length; guint64 rb_size; @@ -1161,7 +1161,7 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length, /* allocate the output buffer of the requested size */ buf = gst_buffer_new_allocate (NULL, length, 0); - data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE); + orig = data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE); GST_DEBUG_OBJECT (queue, "Reading %u bytes from %" G_GUINT64_FORMAT, length, offset); @@ -1272,7 +1272,7 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length, GST_DEBUG_OBJECT (queue, "%u bytes left to read", remaining); } - gst_buffer_unmap (buf, data, length); + gst_buffer_unmap (buf, orig, length); GST_BUFFER_OFFSET (buf) = offset; GST_BUFFER_OFFSET_END (buf) = offset + length; |