mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 07:26:29 +00:00
rtsp-media: Only unblock the media in suspend() when actually changing the state
Otherwise we're going to lose a few packets for live streams during DESCRIBE.
This commit is contained in:
parent
e4264381a5
commit
bbdf0a47d1
1 changed files with 5 additions and 1 deletions
|
@ -3662,6 +3662,7 @@ default_suspend (GstRTSPMedia * media)
|
||||||
{
|
{
|
||||||
GstRTSPMediaPrivate *priv = media->priv;
|
GstRTSPMediaPrivate *priv = media->priv;
|
||||||
GstStateChangeReturn ret;
|
GstStateChangeReturn ret;
|
||||||
|
gboolean unblock = FALSE;
|
||||||
|
|
||||||
switch (priv->suspend_mode) {
|
switch (priv->suspend_mode) {
|
||||||
case GST_RTSP_SUSPEND_MODE_NONE:
|
case GST_RTSP_SUSPEND_MODE_NONE:
|
||||||
|
@ -3672,6 +3673,7 @@ default_suspend (GstRTSPMedia * media)
|
||||||
ret = set_target_state (media, GST_STATE_PAUSED, TRUE);
|
ret = set_target_state (media, GST_STATE_PAUSED, TRUE);
|
||||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||||
goto state_failed;
|
goto state_failed;
|
||||||
|
unblock = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_RTSP_SUSPEND_MODE_RESET:
|
case GST_RTSP_SUSPEND_MODE_RESET:
|
||||||
GST_DEBUG ("media %p suspend to NULL", media);
|
GST_DEBUG ("media %p suspend to NULL", media);
|
||||||
|
@ -3684,12 +3686,14 @@ default_suspend (GstRTSPMedia * media)
|
||||||
* is actually from NULL to PLAY will create a new sequence
|
* is actually from NULL to PLAY will create a new sequence
|
||||||
* number. */
|
* number. */
|
||||||
g_ptr_array_foreach (priv->streams, (GFunc) do_set_seqnum, NULL);
|
g_ptr_array_foreach (priv->streams, (GFunc) do_set_seqnum, NULL);
|
||||||
|
unblock = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* let the streams do the state changes freely, if any */
|
/* let the streams do the state changes freely, if any */
|
||||||
|
if (unblock)
|
||||||
media_streams_set_blocked (media, FALSE);
|
media_streams_set_blocked (media, FALSE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue