mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
v4l2codecs: Always chain up to parent decide_allocation function
The `gst_video_decoder_negotiate_pool` function expects the `decide_allocation` function to always provide a pool and will fail to negotiate if the pool is missing. If we return immediately (even if we don't need to do anything special) negotiation will fail if the downstream element does not propose a pool. Fix by chaining up to the default `decide_allocation` function which adds a fallback pool if one was not already proposed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4630>
This commit is contained in:
parent
42c12c9c73
commit
70ff80a873
3 changed files with 6 additions and 3 deletions
|
@ -417,7 +417,7 @@ gst_v4l2_codec_h264_dec_decide_allocation (GstVideoDecoder * decoder,
|
|||
/* If we are streaming here, then it means there is nothing allocation
|
||||
* related in the new state and allocation can be ignored */
|
||||
if (self->streaming)
|
||||
return TRUE;
|
||||
goto no_internal_changes;
|
||||
|
||||
self->has_videometa = gst_query_find_allocation_meta (query,
|
||||
GST_VIDEO_META_API_TYPE, NULL);
|
||||
|
@ -452,6 +452,7 @@ gst_v4l2_codec_h264_dec_decide_allocation (GstVideoDecoder * decoder,
|
|||
|
||||
self->src_pool = gst_v4l2_codec_pool_new (self->src_allocator, &self->vinfo);
|
||||
|
||||
no_internal_changes:
|
||||
/* Our buffer pool is internal, we will let the base class create a video
|
||||
* pool, and use it if we are running out of buffers or if downstream does
|
||||
* not support GstVideoMeta */
|
||||
|
|
|
@ -446,7 +446,7 @@ gst_v4l2_codec_h265_dec_decide_allocation (GstVideoDecoder * decoder,
|
|||
guint min = 0;
|
||||
|
||||
if (self->streaming)
|
||||
return TRUE;
|
||||
goto no_internal_changes;
|
||||
|
||||
self->has_videometa = gst_query_find_allocation_meta (query,
|
||||
GST_VIDEO_META_API_TYPE, NULL);
|
||||
|
@ -465,6 +465,7 @@ gst_v4l2_codec_h265_dec_decide_allocation (GstVideoDecoder * decoder,
|
|||
GST_PAD_SRC, self->min_pool_size + min + 1);
|
||||
self->src_pool = gst_v4l2_codec_pool_new (self->src_allocator, &self->vinfo);
|
||||
|
||||
no_internal_changes:
|
||||
/* Our buffer pool is internal, we will let the base class create a video
|
||||
* pool, and use it if we are running out of buffers or if downstream does
|
||||
* not support GstVideoMeta */
|
||||
|
|
|
@ -284,7 +284,7 @@ gst_v4l2_codec_vp8_dec_decide_allocation (GstVideoDecoder * decoder,
|
|||
guint num_bitstream;
|
||||
|
||||
if (self->streaming)
|
||||
return TRUE;
|
||||
goto no_internal_changes;
|
||||
|
||||
self->has_videometa = gst_query_find_allocation_meta (query,
|
||||
GST_VIDEO_META_API_TYPE, NULL);
|
||||
|
@ -319,6 +319,7 @@ gst_v4l2_codec_vp8_dec_decide_allocation (GstVideoDecoder * decoder,
|
|||
|
||||
self->src_pool = gst_v4l2_codec_pool_new (self->src_allocator, &self->vinfo);
|
||||
|
||||
no_internal_changes:
|
||||
/* Our buffer pool is internal, we will let the base class create a video
|
||||
* pool, and use it if we are running out of buffers or if downstream does
|
||||
* not support GstVideoMeta */
|
||||
|
|
Loading…
Reference in a new issue