mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
v4l2videodec: Check that pool where allocated before flushing them
Upon error, the pools might not have been allocated yet, hence we should not try and flush them (even though we still want to make sure the processing thread is fully stopped).
This commit is contained in:
parent
6196026c76
commit
a8024fef04
1 changed files with 5 additions and 2 deletions
|
@ -276,7 +276,10 @@ gst_v4l2_video_dec_flush (GstVideoDecoder * decoder)
|
||||||
gst_pad_stop_task (decoder->srcpad);
|
gst_pad_stop_task (decoder->srcpad);
|
||||||
self->output_flow = GST_FLOW_OK;
|
self->output_flow = GST_FLOW_OK;
|
||||||
|
|
||||||
|
if (self->v4l2output->pool)
|
||||||
gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2output->pool));
|
gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2output->pool));
|
||||||
|
|
||||||
|
if (self->v4l2capture->pool)
|
||||||
gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2capture->pool));
|
gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2capture->pool));
|
||||||
|
|
||||||
/* Output will remain flushing until new frame comes in */
|
/* Output will remain flushing until new frame comes in */
|
||||||
|
|
Loading…
Reference in a new issue