uvcsink: extract common code to reset caps_changed
The caps_changed flag must be reset for streamon and streamoff. Extract it to a common path. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
This commit is contained in:
parent
a9eef25717
commit
24daf9ea3d
@ -363,9 +363,11 @@ gst_uvc_sink_sinkpad_event_peer_probe (GstPad * pad,
|
|||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (self, "caps %p", event);
|
GST_DEBUG_OBJECT (self, "caps %p", event);
|
||||||
|
|
||||||
|
if (self->streamon || self->streamoff)
|
||||||
|
g_atomic_int_set (&self->caps_changed, FALSE);
|
||||||
|
|
||||||
if (self->streamon) {
|
if (self->streamon) {
|
||||||
g_atomic_int_set (&self->streamon, FALSE);
|
g_atomic_int_set (&self->streamon, FALSE);
|
||||||
g_atomic_int_set (&self->caps_changed, FALSE);
|
|
||||||
gst_uvc_sink_to_v4l2sink (self);
|
gst_uvc_sink_to_v4l2sink (self);
|
||||||
|
|
||||||
if (!self->streaming)
|
if (!self->streaming)
|
||||||
@ -374,7 +376,6 @@ gst_uvc_sink_sinkpad_event_peer_probe (GstPad * pad,
|
|||||||
|
|
||||||
if (self->streamoff) {
|
if (self->streamoff) {
|
||||||
g_atomic_int_set (&self->streamoff, FALSE);
|
g_atomic_int_set (&self->streamoff, FALSE);
|
||||||
g_atomic_int_set (&self->caps_changed, FALSE);
|
|
||||||
|
|
||||||
if (self->streaming)
|
if (self->streaming)
|
||||||
GST_DEBUG_OBJECT (self, "something went wrong!");
|
GST_DEBUG_OBJECT (self, "something went wrong!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user