mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtspsrc: Seek handling is always done with a valid event
Remove the checks
This commit is contained in:
parent
14a9cc603e
commit
418a6270e5
1 changed files with 18 additions and 27 deletions
|
@ -2400,7 +2400,6 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
GList *walk;
|
||||
const gchar *seek_style = NULL;
|
||||
|
||||
if (event) {
|
||||
GST_DEBUG_OBJECT (src, "doing seek with event %" GST_PTR_FORMAT, event);
|
||||
|
||||
gst_event_parse_seek (event, &rate, &format, &flags,
|
||||
|
@ -2421,12 +2420,6 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
/* Additional seeking-to-beginning-only check */
|
||||
if (src->seekable == 0.0 && cur != 0)
|
||||
goto not_seekable;
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (src, "doing seek without event");
|
||||
flags = 0;
|
||||
cur_type = GST_SEEK_TYPE_SET;
|
||||
stop_type = GST_SEEK_TYPE_SET;
|
||||
}
|
||||
|
||||
if (flags & GST_SEEK_FLAG_SEGMENT)
|
||||
goto invalid_segment_flag;
|
||||
|
@ -2465,11 +2458,9 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
|
||||
/* configure the seek parameters in the seeksegment. We will then have the
|
||||
* right values in the segment to perform the seek */
|
||||
if (event) {
|
||||
GST_DEBUG_OBJECT (src, "configuring seek");
|
||||
gst_segment_do_seek (&seeksegment, rate, format, flags,
|
||||
cur_type, cur, stop_type, stop, &update);
|
||||
}
|
||||
|
||||
/* figure out the last position we need to play. If it's configured (stop !=
|
||||
* -1), use that, else we play until the total duration of the file */
|
||||
|
|
Loading…
Reference in a new issue