2014-11-01, 10:07
This makes it work:
Basically we read from a Null ptr. I will ping the original author to see if this fix is correct. I never did something with PGS Subs. Can you pick that patch and verify?
Code:
From 65120f92f671656d2a66012fb013f10728da344c Mon Sep 17 00:00:00 2001
From: fritsch <[email protected]>
Date: Sat, 1 Nov 2014 09:05:51 +0100
Subject: [PATCH] PGS Subs: Don't read from null ptr
---
xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
index 72b9bca..326f9d2 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
@@ -294,9 +294,12 @@ CDVDOverlay* CDVDOverlayCodecFFmpeg::GetOverlay()
uint8_t* t = overlay->data;
for(int i=0;i<rect.h;i++)
{
- memcpy(t, s, rect.w);
- s += rect.pict.linesize[0];
- t += overlay->linesize;
+ if (s && t)
+ {
+ memcpy(t, s, rect.w);
+ s += rect.pict.linesize[0];
+ t += overlay->linesize;
+ }
}
for(int i=0;i<rect.nb_colors;i++)
--
1.9.1
Basically we read from a Null ptr. I will ping the original author to see if this fix is correct. I never did something with PGS Subs. Can you pick that patch and verify?