mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
rtspsrc: Reset combined flows after a seek before restarting
After a flushing seek, rtspsrc doesn't reset the last_ret value for streams, so might immediately shut down again when it resumes pushing buffers to pads due to a cached `GST_FLOW_FLUSHING` result Prevent a stored flushing value from immediately stopping playback again by resetting pad flows before (re)starting playback. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6216>
This commit is contained in:
parent
edd2b3c6ee
commit
fb8131b7da
1 changed files with 12 additions and 0 deletions
|
@ -471,6 +471,8 @@ static GstFlowReturn gst_rtspsrc_push_backchannel_buffer (GstRTSPSrc * src,
|
||||||
static GstFlowReturn gst_rtspsrc_push_backchannel_sample (GstRTSPSrc * src,
|
static GstFlowReturn gst_rtspsrc_push_backchannel_sample (GstRTSPSrc * src,
|
||||||
guint id, GstSample * sample);
|
guint id, GstSample * sample);
|
||||||
|
|
||||||
|
static void gst_rtspsrc_reset_flows (GstRTSPSrc * src);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
guint8 pt;
|
guint8 pt;
|
||||||
|
@ -2810,6 +2812,7 @@ gst_rtspsrc_flush (GstRTSPSrc * src, gboolean flush, gboolean playing)
|
||||||
state = GST_STATE_PAUSED;
|
state = GST_STATE_PAUSED;
|
||||||
}
|
}
|
||||||
gst_rtspsrc_push_event (src, event);
|
gst_rtspsrc_push_event (src, event);
|
||||||
|
gst_rtspsrc_reset_flows (src);
|
||||||
gst_rtspsrc_loop_send_cmd (src, cmd, CMD_LOOP);
|
gst_rtspsrc_loop_send_cmd (src, cmd, CMD_LOOP);
|
||||||
gst_rtspsrc_set_state (src, state);
|
gst_rtspsrc_set_state (src, state);
|
||||||
}
|
}
|
||||||
|
@ -5187,6 +5190,15 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_rtspsrc_reset_flows (GstRTSPSrc * src)
|
||||||
|
{
|
||||||
|
for (GList * streams = src->streams; streams; streams = g_list_next (streams)) {
|
||||||
|
GstRTSPStream *ostream = (GstRTSPStream *) streams->data;
|
||||||
|
ostream->last_ret = GST_FLOW_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_rtspsrc_stream_push_event (GstRTSPSrc * src, GstRTSPStream * stream,
|
gst_rtspsrc_stream_push_event (GstRTSPSrc * src, GstRTSPStream * stream,
|
||||||
GstEvent * event)
|
GstEvent * event)
|
||||||
|
|
Loading…
Reference in a new issue