mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
segment: move g_return_if_fail to where it is needed
This commit is contained in:
parent
0ff0e6a434
commit
8412c2a656
1 changed files with 4 additions and 4 deletions
|
@ -555,12 +555,12 @@ gst_segment_to_stream_time (GstSegment * segment, GstFormat format,
|
|||
gint64 result, start, stop, time;
|
||||
gdouble abs_applied_rate;
|
||||
|
||||
g_return_val_if_fail (segment != NULL, -1);
|
||||
|
||||
/* format does not matter for -1 */
|
||||
if (G_UNLIKELY (position == -1))
|
||||
return -1;
|
||||
|
||||
g_return_val_if_fail (segment != NULL, -1);
|
||||
|
||||
if (G_UNLIKELY (segment->format == GST_FORMAT_UNDEFINED))
|
||||
segment->format = format;
|
||||
|
||||
|
@ -641,11 +641,11 @@ gst_segment_to_running_time (GstSegment * segment, GstFormat format,
|
|||
gint64 result;
|
||||
gint64 start, stop, accum;
|
||||
|
||||
g_return_val_if_fail (segment != NULL, -1);
|
||||
|
||||
if (G_UNLIKELY (position == -1))
|
||||
return -1;
|
||||
|
||||
g_return_val_if_fail (segment != NULL, -1);
|
||||
|
||||
if (G_UNLIKELY (segment->format == GST_FORMAT_UNDEFINED))
|
||||
segment->format = format;
|
||||
|
||||
|
|
Loading…
Reference in a new issue