mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
plugins: check dmabuf-import for sink pad allocator
Check earlier if upstream video source has activated the dmabuf-import io-mode (hack to disappear soon), thus we can avoid the re-assignation of a new allocator.
This commit is contained in:
parent
773eea0db0
commit
020cb8badb
1 changed files with 8 additions and 2 deletions
|
@ -514,8 +514,14 @@ ensure_sinkpad_allocator (GstVaapiPluginBase * plugin, GstVideoInfo * vinfo)
|
|||
if (!reset_allocator (plugin->sinkpad_allocator, vinfo))
|
||||
return TRUE;
|
||||
|
||||
plugin->sinkpad_allocator =
|
||||
gst_vaapi_video_allocator_new (plugin->display, vinfo, 0);
|
||||
if (has_dmabuf_capable_peer (plugin, plugin->sinkpad)) {
|
||||
plugin->sinkpad_allocator =
|
||||
gst_vaapi_dmabuf_allocator_new (plugin->display, vinfo,
|
||||
GST_VAAPI_SURFACE_ALLOC_FLAG_LINEAR_STORAGE);
|
||||
} else {
|
||||
plugin->sinkpad_allocator =
|
||||
gst_vaapi_video_allocator_new (plugin->display, vinfo, 0);
|
||||
}
|
||||
return plugin->sinkpad_allocator != NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue