mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
rtsp-media: Only unprepare a media if it was not already unpreparing anyway
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1083>
This commit is contained in:
parent
f0c3eefefc
commit
e9d551b45c
1 changed files with 8 additions and 0 deletions
|
@ -4101,6 +4101,8 @@ gst_rtsp_media_unprepare (GstRTSPMedia * media)
|
|||
priv->prepare_count--;
|
||||
if (priv->prepare_count > 0)
|
||||
goto is_busy;
|
||||
if (priv->status == GST_RTSP_MEDIA_STATUS_UNPREPARING)
|
||||
goto is_unpreparing;
|
||||
|
||||
GST_INFO ("unprepare media %p", media);
|
||||
set_target_state (media, GST_STATE_NULL, FALSE);
|
||||
|
@ -4126,6 +4128,12 @@ was_unprepared:
|
|||
GST_INFO ("media %p was already unprepared", media);
|
||||
return TRUE;
|
||||
}
|
||||
is_unpreparing:
|
||||
{
|
||||
g_rec_mutex_unlock (&priv->state_lock);
|
||||
GST_INFO ("media %p is already unpreparing", media);
|
||||
return TRUE;
|
||||
}
|
||||
is_busy:
|
||||
{
|
||||
GST_INFO ("media %p still prepared %d times", media, priv->prepare_count);
|
||||
|
|
Loading…
Reference in a new issue