basesrc: Check the return value of gst_segment_do_seek()

Don't assume that a given seek succeeds - check the return result.
This commit is contained in:
Jan Schmidt 2019-11-22 23:53:59 +11:00 committed by GStreamer Merge Bot
parent dcb2be3282
commit 1b92672e3b

View file

@ -1426,8 +1426,11 @@ gst_base_src_default_prepare_seek_segment (GstBaseSrc * src, GstEvent * event,
}
/* And finally, configure our output segment in the desired format */
gst_segment_do_seek (segment, rate, dest_format, flags, start_type, start,
stop_type, stop, &update);
if (res) {
res =
gst_segment_do_seek (segment, rate, dest_format, flags, start_type,
start, stop_type, stop, &update);
}
if (!res)
goto no_format;