[SCM] xbmc/master: Define AV_CODEC_ID_SUBRIP to AV_CODEC_ID_TEXT in libav hacks and fix compilation
rbalint at users.alioth.debian.org
rbalint at users.alioth.debian.org
Wed May 21 22:29:25 UTC 2014
The following commit has been merged in the master branch:
commit 43714408436274a8ef154b25925f9bd7caba5e3d
Author: Balint Reczey <balint at balintreczey.hu>
Date: Wed May 21 23:59:07 2014 +0200
Define AV_CODEC_ID_SUBRIP to AV_CODEC_ID_TEXT in libav hacks and fix compilation
diff --git a/debian/patches/0006-Define-AV_CODEC_ID_SUBRIP-to-AV_CODEC_ID_TEXT-in-lib.patch b/debian/patches/0006-Define-AV_CODEC_ID_SUBRIP-to-AV_CODEC_ID_TEXT-in-lib.patch
new file mode 100644
index 0000000..305fd08
--- /dev/null
+++ b/debian/patches/0006-Define-AV_CODEC_ID_SUBRIP-to-AV_CODEC_ID_TEXT-in-lib.patch
@@ -0,0 +1,50 @@
+From bffb887a8d1137b26ca2605734c4c03673a40b42 Mon Sep 17 00:00:00 2001
+From: Balint Reczey <balint at balintreczey.hu>
+Date: Wed, 21 May 2014 23:48:37 +0200
+Subject: [PATCH 2/3] Define AV_CODEC_ID_SUBRIP to AV_CODEC_ID_TEXT in libav
+ hacks and fix compilation
+
+---
+ lib/xbmc-libav-hacks/libav_hacks.h | 2 +-
+ xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp | 9 ++++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/lib/xbmc-libav-hacks/libav_hacks.h b/lib/xbmc-libav-hacks/libav_hacks.h
+index a315c05..af64980 100644
+--- a/lib/xbmc-libav-hacks/libav_hacks.h
++++ b/lib/xbmc-libav-hacks/libav_hacks.h
+@@ -45,7 +45,7 @@
+ #define AVFRAME_IN_LAVU
+
+ #define AV_CODEC_ID_OTF AV_CODEC_ID_TTF
+-#define AV_CODEC_ID_SUBRIP AV_CODEC_ID_FIRST_SUBTITLE
++#define AV_CODEC_ID_SUBRIP AV_CODEC_ID_TEXT
+
+ 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 a7445d3..dcb7534 100644
+--- a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
++++ b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
+@@ -391,10 +391,17 @@ CDVDOverlayCodec* CDVDFactoryCodec::CreateOverlayCodec( CDVDStreamInfo &hint )
+ CDVDOverlayCodec* pCodec = NULL;
+ CDVDCodecOptions options;
+
++ // not all FFmpeg versions have AV_CODEC_ID_SUBRIP
++ // But when they have it, it works like AV_CODEC_ID_TEXT here
++ if (AV_CODEC_ID_SUBRIP == hint.codec) {
++ pCodec = OpenCodec(new CDVDOverlayCodecText(), hint, options);
++ if( pCodec ) return pCodec;
++ return NULL;
++ }
++
+ switch (hint.codec)
+ {
+ case AV_CODEC_ID_TEXT:
+- case AV_CODEC_ID_SUBRIP:
+ pCodec = OpenCodec(new CDVDOverlayCodecText(), hint, options);
+ if( pCodec ) return pCodec;
+ break;
+--
+1.9.1
+
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
deleted file mode 100644
index df9111f..0000000
--- a/debian/patches/0006-Not-all-FFmpeg-versions-have-AV_CODEC_ID_SUBRIP.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-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 f8ed748..915a75b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,7 +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
+0006-Define-AV_CODEC_ID_SUBRIP-to-AV_CODEC_ID_TEXT-in-lib.patch
0007-Enable-using-external-ffmpeg-in-.-configure.patch
04-differentiate-from-vanilla-XBMC.patch
05-Fix-GLES-with-X11.patch
--
xbmc packaging
More information about the pkg-multimedia-commits
mailing list