mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
buffer: add return values to g_return_if_fail
FIxes previous commit.
This commit is contained in:
parent
c068b225fe
commit
cbfafd212b
1 changed files with 4 additions and 3 deletions
|
@ -1193,13 +1193,14 @@ gst_buffer_is_memory_range_writable (GstBuffer * buffer, guint idx, gint length)
|
|||
{
|
||||
guint i, len;
|
||||
|
||||
g_return_if_fail (GST_IS_BUFFER (buffer));
|
||||
g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
|
||||
|
||||
GST_CAT_DEBUG (GST_CAT_BUFFER, "idx %u, length %d", idx, length);
|
||||
|
||||
len = GST_BUFFER_MEM_LEN (buffer);
|
||||
g_return_if_fail ((len == 0 && idx == 0 && length == -1) ||
|
||||
(length == -1 && idx < len) || (length > 0 && length + idx <= len));
|
||||
g_return_val_if_fail ((len == 0 && idx == 0 && length == -1) ||
|
||||
(length == -1 && idx < len) || (length > 0 && length + idx <= len),
|
||||
FALSE);
|
||||
|
||||
if (length == -1)
|
||||
length = len - idx;
|
||||
|
|
Loading…
Reference in a new issue