mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 08:42:32 +00:00
caps: avoid doing logic in g_assert
Make sure we still do the right thing when glib is compiled without assertions.
This commit is contained in:
parent
3c87b8850f
commit
5602b935de
1 changed files with 2 additions and 1 deletions
|
@ -1379,7 +1379,8 @@ gst_caps_subtract (const GstCaps * minuend, const GstCaps * subtrahend)
|
|||
You can only remove everything or nothing and that is done above.
|
||||
Note: there's a test that checks this behaviour. */
|
||||
g_return_val_if_fail (!gst_caps_is_any (minuend), NULL);
|
||||
g_assert ((sublen = subtrahend->structs->len) > 0);
|
||||
sublen = subtrahend->structs->len;
|
||||
g_assert (sublen > 0);
|
||||
|
||||
src = gst_caps_copy (minuend);
|
||||
for (i = 0; i < sublen; i++) {
|
||||
|
|
Loading…
Reference in a new issue