mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
camerabin2: Handle videosink states more carefully
When going to ready, camerabin2 could create an empty file if the videosink was put to ready. This patch only puts videosink to ready on the PAUSED_TO_READY state change if it is on PAUSED or PLAYING.
This commit is contained in:
parent
3da135ce02
commit
6395b45908
1 changed files with 3 additions and 1 deletions
|
@ -630,8 +630,10 @@ gst_camera_bin_change_state (GstElement * element, GstStateChange trans)
|
|||
|
||||
switch (trans) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_tag_setter_reset_tags (GST_TAG_SETTER (camera));
|
||||
if (GST_STATE (camera->videosink) >= GST_STATE_PAUSED)
|
||||
gst_element_set_state (camera->videosink, GST_STATE_READY);
|
||||
|
||||
gst_tag_setter_reset_tags (GST_TAG_SETTER (camera));
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
gst_element_set_state (camera->videosink, GST_STATE_NULL);
|
||||
|
|
Loading…
Reference in a new issue