mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
v4l2videodec: add cap negotiation fail check in the capture configuration change
The capture configuration change may cause negotiation fail. Need to check it to avoid enter the endless loop. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2960>
This commit is contained in:
parent
a8387fdc6b
commit
e76e98d109
1 changed files with 9 additions and 1 deletions
|
@ -684,8 +684,16 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder)
|
|||
ret = gst_v4l2_video_dec_setup_capture (decoder);
|
||||
if (ret != GST_FLOW_OK) {
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
|
||||
/* if caps negotiation failed, avoid trying it repeatly */
|
||||
if (ret == GST_FLOW_NOT_NEGOTIATED) {
|
||||
GST_ERROR_OBJECT (decoder,
|
||||
"capture configuration change fail, return negotiation fail");
|
||||
goto beach;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
g_atomic_int_set (&self->capture_configuration_change, FALSE);
|
||||
}
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
|
|
Loading…
Reference in a new issue