Commit 03cdd32b authored by Wim Taymans's avatar Wim Taymans

bufferlist: avoid reading past the array

When the foreach function told us to remove the buffer from the list, decrease
the length of the array or else we might read past the last item in the array.
parent e694f5e7
......@@ -210,6 +210,7 @@ gst_buffer_list_foreach (GstBufferList * list, GstBufferListFunc func,
if (buf != buf_ret) {
if (buf_ret == NULL) {
g_array_remove_index (list->array, i);
} else {
g_array_index (list->array, GstBuffer *, i) = buf_ret;
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