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
This commit is contained in:
Ilya Konstantinov 2015-04-27 15:09:18 +03:00 committed by Sebastian Dröge
parent 8cd65c3250
commit ad8bf99f04

View file

@ -163,9 +163,10 @@ gst_core_media_buffer_wrap_block_buffer (GstBuffer * buf,
return FALSE; return FALSE;
} }
/* retaining the CMBlockBuffer so it won't go away for the lifetime of the GstMemory */
gst_buffer_append_memory (buf, gst_buffer_append_memory (buf,
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data, gst_memory_new_wrapped (0, data, length_at_offset, 0, length_at_offset,
length_at_offset, 0, length_at_offset, NULL, NULL)); (gpointer) CFRetain (block_buf), (GDestroyNotify) CFRelease));
offset += length_at_offset; offset += length_at_offset;
} while (offset < total_length); } while (offset < total_length);