mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
gst: update buffer size only if format defines a size
For encoded formats, p->video_info.size will be 0. If the pipewiresrc handles an encoded format, the bufferpool will be configured to allocate buffers of size 0. This will cause errors later when trying to copy the frames into the pipewire buffers. Update the bufferpool size only if video_info defines an actual buffer size.
This commit is contained in:
parent
bd15e5275b
commit
efa08e9892
1 changed files with 4 additions and 1 deletions
|
|
@ -228,7 +228,10 @@ set_config (GstBufferPool * pool, GstStructure * config)
|
|||
p->add_metavideo = has_video && gst_buffer_pool_config_has_option (config,
|
||||
GST_BUFFER_POOL_OPTION_VIDEO_META);
|
||||
|
||||
gst_buffer_pool_config_set_params (config, caps, p->video_info.size, min_buffers, max_buffers);
|
||||
if (p->video_info.size != 0)
|
||||
size = p->video_info.size;
|
||||
|
||||
gst_buffer_pool_config_set_params (config, caps, size, min_buffers, max_buffers);
|
||||
|
||||
return GST_BUFFER_POOL_CLASS (gst_pipewire_pool_parent_class)->set_config (pool, config);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue