DVDFactoryCodec: Remove pointless libav #ifery and improve the libav_hacks.h
authorAlexis Ballier <aballier@gentoo.org>
Fri, 2 Aug 2013 14:27:52 +0000 (10:27 -0400)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 6 Aug 2013 14:18:38 +0000 (10:18 -0400)
hackery so that it actually compiles with libav.

lib/xbmc-libav-hacks/libav_hacks.h
xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp

index bf3ab7b..4f7e289 100644 (file)
@@ -41,7 +41,7 @@
 #define AVFRAME_IN_LAVU
 
 #define AV_CODEC_ID_OTF AV_CODEC_ID_TTF
-#define AV_CODEC_ID_SUBRIP  AV_CODEC_ID_TEXT
+#define AV_CODEC_ID_SUBRIP  AV_CODEC_ID_FIRST_SUBTITLE
 
 AVDictionary *av_frame_get_metadata       (const AVFrame *frame);
 
index ab3696e..514a5e1 100644 (file)
@@ -389,12 +389,7 @@ CDVDOverlayCodec* CDVDFactoryCodec::CreateOverlayCodec( CDVDStreamInfo &hint )
   switch (hint.codec)
   {
     case AV_CODEC_ID_TEXT:
-#if defined(LIBAVCODEC_FROM_FFMPEG) && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54,53,100)
-    // API changed in:
-    // ffmpeg: commit 2626cc4580bfd560c6983338d77b2c11c16af94f (11 Aug 2012)
-    //         release 1.0 (28 Sept 2012)
     case AV_CODEC_ID_SUBRIP:
-#endif
       pCodec = OpenCodec(new CDVDOverlayCodecText(), hint, options);
       if( pCodec ) return pCodec;
       break;