Commit a754eb45 authored by Prashant Gotarne's avatar Prashant Gotarne Committed by Tim-Philipp Müller

bufferlist: make sure list is writable before adding or removing buffers

https://bugzilla.gnome.org/show_bug.cgi?id=747439
parent c547e010
......@@ -310,6 +310,7 @@ gst_buffer_list_insert (GstBufferList * list, gint idx, GstBuffer * buffer)
g_return_if_fail (GST_IS_BUFFER_LIST (list));
g_return_if_fail (buffer != NULL);
g_return_if_fail (gst_buffer_list_is_writable (list));
if (idx == -1 && list->n_buffers < list->n_allocated) {
list->buffers[list->n_buffers++] = buffer;
......@@ -359,6 +360,7 @@ gst_buffer_list_remove (GstBufferList * list, guint idx, guint length)
g_return_if_fail (GST_IS_BUFFER_LIST (list));
g_return_if_fail (idx < list->n_buffers);
g_return_if_fail (idx + length <= list->n_buffers);
g_return_if_fail (gst_buffer_list_is_writable (list));
gst_buffer_list_remove_range_internal (list, idx, length, TRUE);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment