DVDOverlayCodecText: Remove libav compat #ifery and move it to libav_hacks.h
authorAlexis Ballier <aballier@gentoo.org>
Fri, 2 Aug 2013 14:27:10 +0000 (10:27 -0400)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 6 Aug 2013 14:18:38 +0000 (10:18 -0400)
lib/xbmc-libav-hacks/libav_hacks.h
xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp

index a828850..bf3ab7b 100644 (file)
@@ -41,6 +41,7 @@
 #define AVFRAME_IN_LAVU
 
 #define AV_CODEC_ID_OTF AV_CODEC_ID_TTF
+#define AV_CODEC_ID_SUBRIP  AV_CODEC_ID_TEXT
 
 AVDictionary *av_frame_get_metadata       (const AVFrame *frame);
 
index 263496e..af4eaac 100644 (file)
@@ -44,13 +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;
-#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)
   if(hints.codec == AV_CODEC_ID_SUBRIP)
     return true;
-#endif
   return false;
 }