mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
uvcsink: skip comparison with prev_caps if they are not set
The uvcsink may be put into the READY state to start listening for UVC requests. Therefore, the UVC host may set a streaming format before the GStreamer pipeline is started and the uvcsink received a caps event. In this case, prev_caps will be NULL. If the EVENT_CAPS has not been received, skip the check if the format needs to be changed, since the sink will be started with the format selected by the UVC host, anyway. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7473>
This commit is contained in:
parent
ab0a985c46
commit
f82a716009
1 changed files with 7 additions and 5 deletions
|
@ -624,12 +624,14 @@ gst_uvc_sink_task (gpointer data)
|
|||
gst_caps_unref (configured_caps);
|
||||
|
||||
prev_caps = gst_pad_get_current_caps (self->sinkpad);
|
||||
if (!gst_caps_is_subset (prev_caps, self->cur_caps)) {
|
||||
self->caps_changed = TRUE;
|
||||
GST_DEBUG_OBJECT (self,
|
||||
"caps changed from %" GST_PTR_FORMAT, prev_caps);
|
||||
if (prev_caps) {
|
||||
if (!gst_caps_is_subset (prev_caps, self->cur_caps)) {
|
||||
self->caps_changed = TRUE;
|
||||
GST_DEBUG_OBJECT (self,
|
||||
"caps changed from %" GST_PTR_FORMAT, prev_caps);
|
||||
}
|
||||
gst_caps_unref (prev_caps);
|
||||
}
|
||||
gst_caps_unref (prev_caps);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue