mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtspsrc: fix seeking
Call gst_rtspsrc_connection_flush (src, FALSE) to reset connections as non-flushing before sending PAUSE and PLAY with the new npt range. Without this patch, those commands would fail with EINTR as the connections were still flushing.
This commit is contained in:
parent
fd12ff4c29
commit
c4bf6e8b7e
1 changed files with 4 additions and 0 deletions
|
@ -295,6 +295,7 @@ static gboolean gst_rtspsrc_loop (GstRTSPSrc * src);
|
||||||
static gboolean gst_rtspsrc_stream_push_event (GstRTSPSrc * src,
|
static gboolean gst_rtspsrc_stream_push_event (GstRTSPSrc * src,
|
||||||
GstRTSPStream * stream, GstEvent * event);
|
GstRTSPStream * stream, GstEvent * event);
|
||||||
static gboolean gst_rtspsrc_push_event (GstRTSPSrc * src, GstEvent * event);
|
static gboolean gst_rtspsrc_push_event (GstRTSPSrc * src, GstEvent * event);
|
||||||
|
static void gst_rtspsrc_connection_flush (GstRTSPSrc * src, gboolean flush);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -2239,6 +2240,9 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "stopped streaming");
|
GST_DEBUG_OBJECT (src, "stopped streaming");
|
||||||
|
|
||||||
|
/* stop flushing the rtsp connection so we can send PAUSE/PLAY below */
|
||||||
|
gst_rtspsrc_connection_flush (src, FALSE);
|
||||||
|
|
||||||
/* copy segment, we need this because we still need the old
|
/* copy segment, we need this because we still need the old
|
||||||
* segment when we close the current segment. */
|
* segment when we close the current segment. */
|
||||||
memcpy (&seeksegment, &src->segment, sizeof (GstSegment));
|
memcpy (&seeksegment, &src->segment, sizeof (GstSegment));
|
||||||
|
|
Loading…
Reference in a new issue