mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Use hasFrameFormatChanged() in VDPAU
This commit is contained in:
@@ -534,8 +534,13 @@ void VDPAURenderer::renderFrame(AVFrame* frame)
|
|||||||
m_NextSurfaceIndex = (m_NextSurfaceIndex + 1) % OUTPUT_SURFACE_COUNT;
|
m_NextSurfaceIndex = (m_NextSurfaceIndex + 1) % OUTPUT_SURFACE_COUNT;
|
||||||
|
|
||||||
// We need to create the mixer on the fly, because we don't know the dimensions
|
// We need to create the mixer on the fly, because we don't know the dimensions
|
||||||
// of our video surfaces in advance of decoding
|
// of our video surfaces in advance of decoding. We also need to recreate it when
|
||||||
if (m_VideoMixer == 0) {
|
// the frame format or size changes.
|
||||||
|
if (hasFrameFormatChanged(frame)) {
|
||||||
|
if (m_VideoMixer != 0) {
|
||||||
|
m_VdpVideoMixerDestroy(m_VideoMixer);
|
||||||
|
}
|
||||||
|
|
||||||
VdpChromaType videoSurfaceChroma;
|
VdpChromaType videoSurfaceChroma;
|
||||||
uint32_t videoSurfaceWidth, videoSurfaceHeight;
|
uint32_t videoSurfaceWidth, videoSurfaceHeight;
|
||||||
status = m_VdpVideoSurfaceGetParameters(videoSurface, &videoSurfaceChroma,
|
status = m_VdpVideoSurfaceGetParameters(videoSurface, &videoSurfaceChroma,
|
||||||
|
|||||||
Reference in New Issue
Block a user