mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
gstsegment: Don't use g_return_val_if_fail()
Don't use g_return_val_if_fail() to catch the open-ended segment or empty segment cases in gst_segment_to_running_time_full() g_return_val_if_fail() is for programmer errors, and can be compiled out with a flag. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6219>
This commit is contained in:
parent
7b5a5afa3a
commit
cca0bc31a7
1 changed files with 2 additions and 2 deletions
|
@ -770,8 +770,8 @@ gst_segment_to_running_time_full (const GstSegment * segment, GstFormat format,
|
|||
stop = segment->start + segment->duration;
|
||||
|
||||
/* cannot continue if no stop position set or invalid offset */
|
||||
g_return_val_if_fail (stop != -1, 0);
|
||||
g_return_val_if_fail (stop >= offset, 0);
|
||||
if (stop == -1 || stop < offset)
|
||||
return 0;
|
||||
|
||||
stop -= offset;
|
||||
|
||||
|
|
Loading…
Reference in a new issue