From: <rob...@ke...> - 2010-12-29 19:12:42
|
Module: gst-plugins-good Branch: master Commit: 417b899c44c2eb4a05cb11cba70733ab0dfba442 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=417b899c44c2eb4a05cb11cba70733ab0dfba442 Author: Rob Clark <ro...@ti...> Date: Sat Dec 25 11:52:36 2010 -0600 v4l2sink: fix for PAUSED->READY->PAUSED state transitions When v4l2sink goes to PAUSED->READY it only stops streaming, so the state should be set to STATE_PENDING_STREAMON in case the element transitions back to PLAYING. --- sys/v4l2/gstv4l2sink.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sys/v4l2/gstv4l2sink.c b/sys/v4l2/gstv4l2sink.c index 46c66ad..703c304 100644 --- a/sys/v4l2/gstv4l2sink.c +++ b/sys/v4l2/gstv4l2sink.c @@ -472,7 +472,7 @@ gst_v4l2sink_change_state (GstElement * element, GstStateChange transition) if (!gst_v4l2_object_stop_streaming (v4l2sink->v4l2object)) { return GST_STATE_CHANGE_FAILURE; } - v4l2sink->state = STATE_OFF; + v4l2sink->state = STATE_PENDING_STREAMON; } break; case GST_STATE_CHANGE_READY_TO_NULL: @@ -482,6 +482,7 @@ gst_v4l2sink_change_state (GstElement * element, GstStateChange transition) /* close the device */ if (!gst_v4l2_object_stop (v4l2sink->v4l2object)) return GST_STATE_CHANGE_FAILURE; + v4l2sink->state = STATE_OFF; break; default: break; |