[SCM] xbmc/libav: Revert "Not all FFmpeg versions have AV_CODEC_ID_SUBRIP"

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Wed May 21 22:29:23 UTC 2014


The following commit has been merged in the libav branch:
commit 28a3dffb53ec203ce6581001fd06a138c090ecf7
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Wed May 21 23:43:20 2014 +0200

    Revert "Not all FFmpeg versions have AV_CODEC_ID_SUBRIP"
    
    This reverts commit 00f308083ad7c1e45eaaa4924328be4a64f39b80.

diff --git a/lib/xbmc-libav-hacks/libav_hacks.h b/lib/xbmc-libav-hacks/libav_hacks.h
index f0f4c69..a315c05 100644
--- a/lib/xbmc-libav-hacks/libav_hacks.h
+++ b/lib/xbmc-libav-hacks/libav_hacks.h
@@ -45,6 +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
 
 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 ddf0c27..a7445d3 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
@@ -394,9 +394,7 @@ 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 3faf876..af4eaac 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp
@@ -44,10 +44,8 @@ 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;
 }
 

-- 
xbmc packaging



More information about the pkg-multimedia-commits mailing list