mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
xbmc: add PR2363
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
0691728636
commit
9832770f9e
202
packages/mediacenter/xbmc/patches/xbmc-990.23-PR2363.patch
Normal file
202
packages/mediacenter/xbmc/patches/xbmc-990.23-PR2363.patch
Normal file
@ -0,0 +1,202 @@
|
||||
From 3d1005fdd34e72f81aff9034f8d30a0d33a780a8 Mon Sep 17 00:00:00 2001
|
||||
From: xbmc <fernetmenta@online.de>
|
||||
Date: Mon, 4 Mar 2013 08:30:47 +0100
|
||||
Subject: [PATCH] Always copy overlays from file parser - Fixes stuck hw
|
||||
resources on render
|
||||
|
||||
---
|
||||
.../cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h | 6 +++
|
||||
.../dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h | 6 +++
|
||||
.../dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h | 11 ++++++
|
||||
.../dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h | 41 ++++++++++++++++++++
|
||||
xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp | 1 +
|
||||
.../dvdplayer/DVDSubtitles/DVDSubtitleParser.h | 8 +++-
|
||||
6 files changed, 72 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h
|
||||
index 8c87bc4..da8de1f 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h
|
||||
@@ -103,6 +103,12 @@ class CDVDOverlay
|
||||
|
||||
bool IsOverlayType(DVDOverlayType type) { return (m_type == type); }
|
||||
|
||||
+ /**
|
||||
+ * return a copy to DVDPlayerSubtitle in order to have hw resources cleared
|
||||
+ * after rendering
|
||||
+ */
|
||||
+ virtual CDVDOverlay* Clone() { return Acquire(); }
|
||||
+
|
||||
double iPTSStartTime;
|
||||
double iPTSStopTime;
|
||||
bool bForced; // display, no matter what
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h
|
||||
index bc90d68..e1cdf59 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h
|
||||
@@ -20,6 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+#include "PlatformDefs.h"
|
||||
#include "DVDOverlay.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -117,6 +118,11 @@ class CDVDOverlayImage : public CDVDOverlay
|
||||
if(palette) free(palette);
|
||||
}
|
||||
|
||||
+ virtual CDVDOverlayImage* Clone()
|
||||
+ {
|
||||
+ return new CDVDOverlayImage(*this);
|
||||
+ }
|
||||
+
|
||||
BYTE* data_at(int sub_x, int sub_y) const
|
||||
{
|
||||
int bpp;
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h
|
||||
index 31deba1..f42c571 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h
|
||||
@@ -37,10 +37,21 @@ class CDVDOverlaySSA : public CDVDOverlay
|
||||
libass->Acquire();
|
||||
}
|
||||
|
||||
+ CDVDOverlaySSA(CDVDOverlaySSA& src)
|
||||
+ : CDVDOverlay(src)
|
||||
+ , m_libass(src.m_libass)
|
||||
+ {
|
||||
+ m_libass->Acquire();
|
||||
+ }
|
||||
+
|
||||
~CDVDOverlaySSA()
|
||||
{
|
||||
if(m_libass)
|
||||
SAFE_RELEASE(m_libass);
|
||||
}
|
||||
|
||||
+ virtual CDVDOverlaySSA* Clone()
|
||||
+ {
|
||||
+ return new CDVDOverlaySSA(*this);
|
||||
+ }
|
||||
};
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h
|
||||
index 849a6e3..54e3bfa 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h
|
||||
@@ -46,6 +46,12 @@ class CDVDOverlayText : public CDVDOverlay
|
||||
m_type = type;
|
||||
}
|
||||
|
||||
+ CElement(CElement& src)
|
||||
+ {
|
||||
+ pNext = NULL;
|
||||
+ m_type = src.m_type;
|
||||
+ }
|
||||
+
|
||||
virtual ~CElement()
|
||||
{
|
||||
}
|
||||
@@ -71,6 +77,12 @@ class CDVDOverlayText : public CDVDOverlay
|
||||
}
|
||||
}
|
||||
|
||||
+ CElementText(CElementText& src)
|
||||
+ : CElement(src)
|
||||
+ {
|
||||
+ m_text = strdup(src.m_text);
|
||||
+ }
|
||||
+
|
||||
virtual ~CElementText()
|
||||
{
|
||||
if (m_text) free(m_text);
|
||||
@@ -81,12 +93,20 @@ class CDVDOverlayText : public CDVDOverlay
|
||||
|
||||
class CElementProperty : public CElement
|
||||
{
|
||||
+ public:
|
||||
CElementProperty() : CElement(ELEMENT_TYPE_PROPERTY)
|
||||
{
|
||||
bItalic = false;
|
||||
bBold = false;
|
||||
}
|
||||
|
||||
+ CElementProperty(CElementProperty& src)
|
||||
+ : CElement(src)
|
||||
+ {
|
||||
+ bItalic = src.bItalic;
|
||||
+ bBold = src.bBold;
|
||||
+ }
|
||||
+
|
||||
public:
|
||||
bool bItalic;
|
||||
bool bBold;
|
||||
@@ -99,6 +119,22 @@ class CDVDOverlayText : public CDVDOverlay
|
||||
m_pEnd = NULL;
|
||||
}
|
||||
|
||||
+ CDVDOverlayText(CDVDOverlayText& src)
|
||||
+ : CDVDOverlay(src)
|
||||
+ {
|
||||
+ m_pHead = NULL;
|
||||
+ m_pEnd = NULL;
|
||||
+ for(CElement* e = src.m_pHead; e; e = e->pNext)
|
||||
+ {
|
||||
+ if(e->IsElementType(ELEMENT_TYPE_TEXT))
|
||||
+ AddElement(new CElementText(*static_cast<CElementText*>(e)));
|
||||
+ else if(e->IsElementType(ELEMENT_TYPE_PROPERTY))
|
||||
+ AddElement(new CElementProperty(*static_cast<CElementProperty*>(e)));
|
||||
+ else
|
||||
+ AddElement(new CElement(*static_cast<CElement*>(e)));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
virtual ~CDVDOverlayText()
|
||||
{
|
||||
CElement* pTemp;
|
||||
@@ -110,6 +146,11 @@ class CDVDOverlayText : public CDVDOverlay
|
||||
}
|
||||
}
|
||||
|
||||
+ virtual CDVDOverlayText* Clone()
|
||||
+ {
|
||||
+ return new CDVDOverlayText(*this);
|
||||
+ }
|
||||
+
|
||||
void AddElement(CDVDOverlayText::CElement* pElement)
|
||||
{
|
||||
pElement->pNext = NULL;
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
|
||||
index 29c8d57..540d890 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
|
||||
@@ -222,6 +222,7 @@ void CDVDPlayerSubtitle::Process(double pts)
|
||||
while(pOverlay)
|
||||
{
|
||||
m_pOverlayContainer->Add(pOverlay);
|
||||
+ pOverlay->Release();
|
||||
pOverlay = m_pSubtitleFileParser->Parse(pts);
|
||||
}
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h
|
||||
index 944bf06..3cd1e95 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h
|
||||
+++ b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h
|
||||
@@ -47,7 +47,13 @@ class CDVDSubtitleParserCollection
|
||||
m_filename = strFile;
|
||||
}
|
||||
virtual ~CDVDSubtitleParserCollection() { }
|
||||
- virtual CDVDOverlay* Parse(double iPts) { return m_collection.Get(iPts); }
|
||||
+ virtual CDVDOverlay* Parse(double iPts)
|
||||
+ {
|
||||
+ CDVDOverlay* o = m_collection.Get(iPts);
|
||||
+ if(o == NULL)
|
||||
+ return o;
|
||||
+ return o->Clone();
|
||||
+ }
|
||||
virtual void Reset() { m_collection.Reset(); }
|
||||
virtual void Dispose() { m_collection.Clear(); }
|
||||
|
||||
--
|
||||
1.7.10
|
||||
|
Loading…
x
Reference in New Issue
Block a user