diff options
author | Ilya Konstantinov <ilya.konstantinov@gmail.com> | 2015-04-27 15:09:18 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-06-25 10:49:05 +0200 |
commit | ad8bf99f044eaecc5aaf50e5e1c9ce4a9761c67d (patch) | |
tree | 65830b82ad97dcc040dfa5331b643fc00b803e00 /sys | |
parent | 8cd65c325093e8c951d8b39d403591871519f750 (diff) | |
download | gstreamer-plugins-bad-ad8bf99f044eaecc5aaf50e5e1c9ce4a9761c67d.tar.gz |
applemedia: enable sharing of CMBlockBuffer data
Instead of wrapping with GST_MEMORY_FLAG_NO_SHARE, we make the GstMemory
object retain the underlying CMBlockBuffer.
https://bugzilla.gnome.org/show_bug.cgi?id=751072
Diffstat (limited to 'sys')
-rw-r--r-- | sys/applemedia/coremediabuffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/applemedia/coremediabuffer.c b/sys/applemedia/coremediabuffer.c index 87e4cc349..681fe14f6 100644 --- a/sys/applemedia/coremediabuffer.c +++ b/sys/applemedia/coremediabuffer.c @@ -163,9 +163,10 @@ gst_core_media_buffer_wrap_block_buffer (GstBuffer * buf, return FALSE; } + /* retaining the CMBlockBuffer so it won't go away for the lifetime of the GstMemory */ gst_buffer_append_memory (buf, - gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data, - length_at_offset, 0, length_at_offset, NULL, NULL)); + gst_memory_new_wrapped (0, data, length_at_offset, 0, length_at_offset, + (gpointer) CFRetain (block_buf), (GDestroyNotify) CFRelease)); offset += length_at_offset; } while (offset < total_length); |