File tree Expand file tree Collapse file tree
app/streaming/video/ffmpeg-renderers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -806,10 +806,16 @@ bool DrmRenderer::initialize(PDECODER_PARAMETERS params)
806806 }
807807
808808 DrmPropertyMap props { m_DrmFd, planeRes->planes [i], DRM_MODE_OBJECT_PLANE };
809- // Only consider overlay planes as valid targets
810- if (auto type = props.property (" type" ); type->initialValue () != DRM_PLANE_TYPE_OVERLAY ) {
811- drmModeFreePlane (plane);
812- continue ;
809+ // Only consider overlay or primary planes as valid targets
810+ // The latter might seem strange, but some DRM devices use
811+ // underlays where the YUV-compatible overlay plane resides
812+ // underneath the primary plane. In this case, we will use
813+ // the primary plane as an overlay plane on top of the video.
814+ if (auto type = props.property (" type" ))
815+ if (type->initialValue () != DRM_PLANE_TYPE_OVERLAY && type->initialValue () != DRM_PLANE_TYPE_PRIMARY ) {
816+ drmModeFreePlane (plane);
817+ continue ;
818+ }
813819 }
814820
815821 // The overlay plane must support ARGB8888
You can’t perform that action at this time.
0 commit comments