mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
v4l2: stop streaming in READY and NULL
This commit is contained in:
parent
387e76114d
commit
d7a27613c1
1 changed files with 5 additions and 8 deletions
|
@ -517,16 +517,13 @@ gst_v4l2sink_change_state (GstElement * element, GstStateChange transition)
|
|||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
#if 0
|
||||
if (v4l2sink->state == STATE_STREAMING) {
|
||||
if (!gst_v4l2_object_stop_streaming (v4l2sink->v4l2object)) {
|
||||
return GST_STATE_CHANGE_FAILURE;
|
||||
}
|
||||
v4l2sink->state = STATE_PENDING_STREAMON;
|
||||
}
|
||||
#endif
|
||||
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
|
||||
return GST_STATE_CHANGE_FAILURE;
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
/* we need to call stop here too */
|
||||
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
|
||||
return GST_STATE_CHANGE_FAILURE;
|
||||
/* close the device */
|
||||
if (!gst_v4l2_object_close (v4l2sink->v4l2object))
|
||||
return GST_STATE_CHANGE_FAILURE;
|
||||
|
|
Loading…
Reference in a new issue