mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
media: wait for buffering to complete
Wait for buffering to complete before changing the state to the target state.
This commit is contained in:
parent
ec0718d7c9
commit
95bf53513f
1 changed files with 7 additions and 1 deletions
|
@ -1725,7 +1725,13 @@ gst_rtsp_media_set_state (GstRTSPMedia * media, GstState state,
|
|||
GST_INFO ("state %s media %p", gst_element_state_get_name (state),
|
||||
media);
|
||||
priv->target_state = state;
|
||||
gst_element_set_state (priv->pipeline, state);
|
||||
/* when we are buffering, don't update the state yet, this will be done
|
||||
* when buffering finishes */
|
||||
if (priv->buffering) {
|
||||
GST_INFO ("Buffering busy, delay state change");
|
||||
} else {
|
||||
gst_element_set_state (priv->pipeline, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
g_signal_emit (media, gst_rtsp_media_signals[SIGNAL_NEW_STATE], 0, state,
|
||||
|
|
Loading…
Reference in a new issue