mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
v4l2: videodec: Detect flushes while setting up the capture
As we missed the fact we were flushing, we could create and activate that buffer pool, and wait on it, causing a hang. We detect that we are flushing by checking the related pad state. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4437>
This commit is contained in:
parent
c9841a5383
commit
00492234bd
1 changed files with 9 additions and 1 deletions
|
@ -746,9 +746,17 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder)
|
|||
goto beach;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (decoder, "Setup the capture queue");
|
||||
ret = gst_v4l2_video_dec_setup_capture (decoder);
|
||||
/* FIXME not super nice ? */
|
||||
if (ret == GST_FLOW_FLUSHING || GST_PAD_IS_FLUSHING (decoder->sinkpad)
|
||||
|| GST_PAD_IS_FLUSHING (decoder->srcpad)) {
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
goto beach;
|
||||
}
|
||||
if (ret != GST_FLOW_OK) {
|
||||
GST_ERROR_OBJECT (decoder, "Failed setup capture queue");
|
||||
GST_ERROR_OBJECT (decoder, "Failed to setup capture queue");
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
goto beach;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue