mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
buffer: fix guards for gst_buffer_take_memory()
Since idx = -1 makes it default to idx=len, len is also a valid input idx.
This commit is contained in:
parent
3bb21e0203
commit
a1f6e02149
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ gst_buffer_take_memory (GstBuffer * buffer, guint idx, GstMemory * mem)
|
|||
g_return_if_fail (GST_IS_BUFFER (buffer));
|
||||
g_return_if_fail (gst_buffer_is_writable (buffer));
|
||||
g_return_if_fail (mem != NULL);
|
||||
g_return_if_fail (idx == -1 || idx < GST_BUFFER_MEM_LEN (buffer));
|
||||
g_return_if_fail (idx == -1 || idx <= GST_BUFFER_MEM_LEN (buffer));
|
||||
|
||||
_memory_add (buffer, idx, mem);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue