mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
kodi: add PR21673 to fix DVD menus on DRMPRIME
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
b920a479f4
commit
ed4308cf0a
@ -0,0 +1,69 @@
|
||||
From e425b4fc3d209c91e130004a67d16b9c46408788 Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Thu, 7 Jul 2022 15:41:58 +0100
|
||||
Subject: [PATCH 1/2] CDVDVideoCodecDRMPRIME: Move picture release after
|
||||
avcodec_receive_frame
|
||||
|
||||
This matches the code order of DVDVideoCodecFFMPEG and is required
|
||||
for working DVD menus
|
||||
---
|
||||
.../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
index b27db92b5f7d7..a7407e76afb6b 100644
|
||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
@@ -536,12 +536,6 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
|
||||
if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)
|
||||
Drain();
|
||||
|
||||
- if (pVideoPicture->videoBuffer)
|
||||
- {
|
||||
- pVideoPicture->videoBuffer->Release();
|
||||
- pVideoPicture->videoBuffer = nullptr;
|
||||
- }
|
||||
-
|
||||
int ret = avcodec_receive_frame(m_pCodecContext, m_pFrame);
|
||||
if (ret == AVERROR(EAGAIN))
|
||||
return VC_BUFFER;
|
||||
@@ -566,6 +560,12 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
|
||||
|
||||
SetPictureParams(pVideoPicture);
|
||||
|
||||
+ if (pVideoPicture->videoBuffer)
|
||||
+ {
|
||||
+ pVideoPicture->videoBuffer->Release();
|
||||
+ pVideoPicture->videoBuffer = nullptr;
|
||||
+ }
|
||||
+
|
||||
if (IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)))
|
||||
{
|
||||
CVideoBufferDRMPRIMEFFmpeg* buffer =
|
||||
|
||||
From 325e745a0a609367007ba814f6eb1829d3d082e7 Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Thu, 7 Jul 2022 12:31:12 +0100
|
||||
Subject: [PATCH 2/2] RendererDRMPRIME: Remove NeedBuffer check for valid fd
|
||||
|
||||
This check breaks DVD menus. All calls return true which prevents
|
||||
new pictures being released, stalling DVD menus
|
||||
---
|
||||
.../VideoRenderers/HwDecRender/RendererDRMPRIME.cpp | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererDRMPRIME.cpp
|
||||
index 36e4093cbe36b..a8667bdbf48e5 100644
|
||||
--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererDRMPRIME.cpp
|
||||
@@ -172,10 +172,6 @@ bool CRendererDRMPRIME::NeedBuffer(int index)
|
||||
if (m_iLastRenderBuffer == index)
|
||||
return true;
|
||||
|
||||
- CVideoBufferDRMPRIME* buffer = dynamic_cast<CVideoBufferDRMPRIME*>(m_buffers[index].videoBuffer);
|
||||
- if (buffer && buffer->m_fb_id)
|
||||
- return true;
|
||||
-
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user