[SCM] xbmc/master: Fix embedded subtitle handling using Libav

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Thu May 15 17:02:44 UTC 2014


The following commit has been merged in the master branch:
commit 813347cc3a3cff28d8b5d5bee5314eadb499f581
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Thu May 15 17:15:43 2014 +0200

    Fix embedded subtitle handling using Libav

diff --git a/debian/patches/0006-Not-all-FFmpeg-versions-have-AV_CODEC_ID_SUBRIP.patch b/debian/patches/0006-Not-all-FFmpeg-versions-have-AV_CODEC_ID_SUBRIP.patch
new file mode 100644
index 0000000..df9111f
--- /dev/null
+++ b/debian/patches/0006-Not-all-FFmpeg-versions-have-AV_CODEC_ID_SUBRIP.patch
@@ -0,0 +1,56 @@
+From d7ac5dca5478740ad53894377574197f989d824c Mon Sep 17 00:00:00 2001
+From: Balint Reczey <balint at balintreczey.hu>
+Date: Thu, 15 May 2014 17:05:34 +0200
+Subject: [PATCH] Not all FFmpeg versions have AV_CODEC_ID_SUBRIP
+
+But if they have it, it works like AV_CODEC_ID_TEXT
+---
+ lib/xbmc-libav-hacks/libav_hacks.h                             | 1 -
+ xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp             | 2 ++
+ xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp | 2 ++
+ 3 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/xbmc-libav-hacks/libav_hacks.h b/lib/xbmc-libav-hacks/libav_hacks.h
+index f81e29e..3ed12a5 100644
+--- a/lib/xbmc-libav-hacks/libav_hacks.h
++++ b/lib/xbmc-libav-hacks/libav_hacks.h
+@@ -45,7 +45,6 @@
+ #define AVFRAME_IN_LAVU
+ 
+ #define AV_CODEC_ID_OTF AV_CODEC_ID_TTF
+-#define AV_CODEC_ID_SUBRIP  AV_CODEC_ID_FIRST_SUBTITLE
+ 
+ AVDictionary *av_frame_get_metadata       (const AVFrame *frame);
+ 
+diff --git a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
+index 14ad038..0a3eb54 100644
+--- a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
++++ b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
+@@ -389,7 +389,9 @@ CDVDOverlayCodec* CDVDFactoryCodec::CreateOverlayCodec( CDVDStreamInfo &hint )
+   switch (hint.codec)
+   {
+     case AV_CODEC_ID_TEXT:
++#ifdef AV_CODEC_ID_SUBRIP
+     case AV_CODEC_ID_SUBRIP:
++#endif
+       pCodec = OpenCodec(new CDVDOverlayCodecText(), hint, options);
+       if( pCodec ) return pCodec;
+       break;
+diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp
+index af4eaac..3faf876 100644
+--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp
++++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp
+@@ -44,8 +44,10 @@ bool CDVDOverlayCodecText::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
+   m_bIsSSA = (hints.codec == AV_CODEC_ID_SSA);
+   if(hints.codec == AV_CODEC_ID_TEXT || hints.codec == AV_CODEC_ID_SSA)
+     return true;
++#ifdef AV_CODEC_ID_SUBRIP
+   if(hints.codec == AV_CODEC_ID_SUBRIP)
+     return true;
++#endif
+   return false;
+ }
+ 
+-- 
+1.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index f73cca4..2ec3310 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
 0002-Fix-compilation-with-libav-10-beta1.patch
 0004-Disable-static-ffmpeg-when-using-external-ffmpeg-liba.patch
 0005-Fix-av_stream_get_r_frame_rate-Libav-hack-accessor.patch
+0006-Not-all-FFmpeg-versions-have-AV_CODEC_ID_SUBRIP.patch
 04-differentiate-from-vanilla-XBMC.patch
 05-Fix-GLES-with-X11.patch
 06-use-external-libraries.patch
@@ -9,3 +10,4 @@
 08-armel.patch
 09-use-correct-ftgl.h
 10-configure-all-arches.patch
+

-- 
xbmc packaging



More information about the pkg-multimedia-commits mailing list