matroska: Check the return value of gst_segment_do_seek()

gst_segment_do_seek() can fail.
This commit is contained in:
Jan Schmidt 2020-03-20 21:32:36 +11:00 committed by Seungha Yang
parent f757fbe0f7
commit 78eaa7c6ed

View file

@ -2816,8 +2816,11 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
seeksegment.stop = seeksegment.duration;
}
gst_segment_do_seek (&seeksegment, rate, format, flags,
cur_type, cur, stop_type, stop, &update);
if (!gst_segment_do_seek (&seeksegment, rate, format, flags,
cur_type, cur, stop_type, stop, &update)) {
GST_WARNING_OBJECT (demux, "gst_segment_do_seek() failed.");
return FALSE;
}
/* Restore the clip timestamp offset */
if (GST_CLOCK_TIME_IS_VALID (demux->stream_start_time)) {