mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
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
1 changed files with 3 additions and 2 deletions
|
@ -363,9 +363,11 @@ gst_uvc_sink_sinkpad_event_peer_probe (GstPad * pad,
|
|||
{
|
||||
GST_DEBUG_OBJECT (self, "caps %p", event);
|
||||
|
||||
if (self->streamon || self->streamoff)
|
||||
g_atomic_int_set (&self->caps_changed, FALSE);
|
||||
|
||||
if (self->streamon) {
|
||||
g_atomic_int_set (&self->streamon, FALSE);
|
||||
g_atomic_int_set (&self->caps_changed, FALSE);
|
||||
gst_uvc_sink_to_v4l2sink (self);
|
||||
|
||||
if (!self->streaming)
|
||||
|
@ -374,7 +376,6 @@ gst_uvc_sink_sinkpad_event_peer_probe (GstPad * pad,
|
|||
|
||||
if (self->streamoff) {
|
||||
g_atomic_int_set (&self->streamoff, FALSE);
|
||||
g_atomic_int_set (&self->caps_changed, FALSE);
|
||||
|
||||
if (self->streaming)
|
||||
GST_DEBUG_OBJECT (self, "something went wrong!");
|
||||
|
|
Loading…
Reference in a new issue