mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-29 12:25:37 +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/5760>
This commit is contained in:
parent
be7e502769
commit
90af9b7704
1 changed files with 5 additions and 2 deletions
|
@ -586,10 +586,13 @@ _va_create_surface_and_export_to_dmabuf (GstVaDisplay * display,
|
|||
if (GST_VIDEO_INFO_N_PLANES (info) != desc.num_layers)
|
||||
goto failed;
|
||||
|
||||
/* 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