summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subprojects/gstreamer/gst/gstsegment.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/subprojects/gstreamer/gst/gstsegment.c b/subprojects/gstreamer/gst/gstsegment.c
index f3977072a3..a26b943e34 100644
--- a/subprojects/gstreamer/gst/gstsegment.c
+++ b/subprojects/gstreamer/gst/gstsegment.c
@@ -769,8 +769,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;