mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-10 10:04:23 +00:00
vaallocator: don't fail if drm fourcc are different
When exporting a DMABuf from a VASurface the user might tell that the surface was allocated with certain fourcc, but the returned VADRMPRIMESurfaceDescriptor migth tell a different fourcc, as in the case or radeonsi driver, for duplicated fourcc, such as YUY2 and YUYV. Originally it was supposed to be a failed exportation. This patch relax this validation by allowing different fourcc. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5778>
This commit is contained in:
parent
e3ff113370
commit
1dfa38ab40
1 changed files with 5 additions and 2 deletions
|
@ -607,10 +607,13 @@ gst_va_dmabuf_allocator_setup_buffer_full (GstAllocator * allocator,
|
|||
|
||||
g_assert (GST_VIDEO_INFO_N_PLANES (&self->info) == desc.num_layers);
|
||||
|
||||
/* YUY2 and YUYV are the same. radeonsi returns always YUYV.
|
||||
* There's no reason to fail if the different fourcc if there're dups.
|
||||
* https://fourcc.org/pixel-format/yuv-yuy2/ */
|
||||
if (fourcc != desc.fourcc) {
|
||||
GST_ERROR ("Unsupported fourcc: %" GST_FOURCC_FORMAT,
|
||||
GST_INFO ("Different fourcc: requested %" GST_FOURCC_FORMAT " - returned %"
|
||||
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc),
|
||||
GST_FOURCC_ARGS (desc.fourcc));
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (desc.num_objects == 0) {
|
||||
|
|
Loading…
Reference in a new issue