aboutsummaryrefslogtreecommitdiff
path: root/multimedia/xbmc
diff options
context:
space:
mode:
authorlarryhaja <larryhaja@gmail.com>2013-11-13 19:34:26 -0800
committerRobby Workman <rworkman@slackbuilds.org>2013-11-14 00:06:33 -0600
commit1a801c6103295fb6ffedc941822056b0c234aa60 (patch)
treef578c28700bef3c7cfa6af06f2603c52f69ce03f /multimedia/xbmc
parentab9d8abf41c825cde76a0fd0be8b9cac88ddff43 (diff)
multimedia/xbmc: Various patch addition/removal to fix build
Added 3 patches, 2 for ffmpeg 2.0 and 1 for Samba 4.0 Removed cwiid patch, removed taglib 1.8 static library Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'multimedia/xbmc')
-rw-r--r--multimedia/xbmc/patches/cwiid-old-api.patch16
-rw-r--r--multimedia/xbmc/patches/samba-4.0.patch24
-rw-r--r--multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch2102
-rw-r--r--multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch14
-rw-r--r--multimedia/xbmc/xbmc.SlackBuild33
-rw-r--r--multimedia/xbmc/xbmc.info6
6 files changed, 2149 insertions, 46 deletions
diff --git a/multimedia/xbmc/patches/cwiid-old-api.patch b/multimedia/xbmc/patches/cwiid-old-api.patch
deleted file mode 100644
index a9cb4431cb9a7..0000000000000
--- a/multimedia/xbmc/patches/cwiid-old-api.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -Naur xbmc-12.0.orig/tools/EventClients/Clients/WiiRemote/CWIID_WiiRemote.cpp xbmc-12.0/tools/EventClients/Clients/WiiRemote/CWIID_WiiRemote.cpp
---- xbmc-12.0.orig/tools/EventClients/Clients/WiiRemote/CWIID_WiiRemote.cpp 2013-01-29 14:20:27.000000000 +0000
-+++ xbmc-12.0/tools/EventClients/Clients/WiiRemote/CWIID_WiiRemote.cpp 2013-02-02 23:13:08.422456751 +0000
-@@ -100,9 +100,11 @@
- g_WiiRemote.ProcessNunchuck(mesg[i].nunchuk_mesg);
- break;
- case CWIID_MESG_ACC:
-- case CWIID_MESG_BALANCE:
- case CWIID_MESG_CLASSIC:
-+#ifndef CWIID_OLD
-+ case CWIID_MESG_BALANCE:
- case CWIID_MESG_MOTIONPLUS:
-+#endif
- //Not implemented
- break;
- case CWIID_MESG_UNKNOWN:
diff --git a/multimedia/xbmc/patches/samba-4.0.patch b/multimedia/xbmc/patches/samba-4.0.patch
new file mode 100644
index 0000000000000..ea1dc7010e809
--- /dev/null
+++ b/multimedia/xbmc/patches/samba-4.0.patch
@@ -0,0 +1,24 @@
+diff -Naur xbmc-12.2.orig/xbmc/filesystem/SMBDirectory.cpp xbmc-12.2/xbmc/filesystem/SMBDirectory.cpp
+--- xbmc-12.2.orig/xbmc/filesystem/SMBDirectory.cpp 2013-05-03 05:57:41.000000000 +0000
++++ xbmc-12.2/xbmc/filesystem/SMBDirectory.cpp 2013-11-12 00:30:28.143499083 +0000
+@@ -44,7 +44,7 @@
+ #include "threads/SingleLock.h"
+ #include "PasswordManager.h"
+
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+
+ #if defined(TARGET_DARWIN)
+ #define XBMC_SMB_MOUNT_PATH "Library/Application Support/XBMC/Mounts/"
+diff -Naur xbmc-12.2.orig/xbmc/filesystem/SmbFile.cpp xbmc-12.2/xbmc/filesystem/SmbFile.cpp
+--- xbmc-12.2.orig/xbmc/filesystem/SmbFile.cpp 2013-05-03 05:57:41.000000000 +0000
++++ xbmc-12.2/xbmc/filesystem/SmbFile.cpp 2013-11-12 00:30:59.577499442 +0000
+@@ -27,7 +27,7 @@
+ #include "PasswordManager.h"
+ #include "SMBDirectory.h"
+ #include "Util.h"
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include "settings/AdvancedSettings.h"
+ #include "settings/GUISettings.h"
+ #include "threads/SingleLock.h"
diff --git a/multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch b/multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch
new file mode 100644
index 0000000000000..d5e70cd446816
--- /dev/null
+++ b/multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch
@@ -0,0 +1,2102 @@
+diff -urN xbmc-12.2-orig/lib/DllAvCodec.h xbmc-12.2-avcodec/lib/DllAvCodec.h
+--- xbmc-12.2-orig/lib/DllAvCodec.h 2013-05-03 16:57:40.000000000 +1100
++++ xbmc-12.2-avcodec/lib/DllAvCodec.h 2013-08-03 15:17:18.828959790 +1100
+@@ -72,8 +72,8 @@
+ virtual void avcodec_register_all(void)=0;
+ virtual void avcodec_flush_buffers(AVCodecContext *avctx)=0;
+ virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)=0;
+- virtual AVCodec *avcodec_find_decoder(enum CodecID id)=0;
+- virtual AVCodec *avcodec_find_encoder(enum CodecID id)=0;
++ virtual AVCodec *avcodec_find_decoder(enum AVCodecID id)=0;
++ virtual AVCodec *avcodec_find_encoder(enum AVCodecID id)=0;
+ virtual int avcodec_close_dont_call(AVCodecContext *avctx)=0;
+ virtual AVFrame *avcodec_alloc_frame(void)=0;
+ virtual int avpicture_fill(AVPicture *picture, uint8_t *ptr, PixelFormat pix_fmt, int width, int height)=0;
+@@ -129,8 +129,8 @@
+ }
+ virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) { *(volatile int *)0x0 = 0; return 0; }
+ virtual int avcodec_close_dont_call(AVCodecContext *avctx) { *(volatile int *)0x0 = 0; return 0; }
+- virtual AVCodec *avcodec_find_decoder(enum CodecID id) { return ::avcodec_find_decoder(id); }
+- virtual AVCodec *avcodec_find_encoder(enum CodecID id) { return ::avcodec_find_encoder(id); }
++ virtual AVCodec *avcodec_find_decoder(enum AVCodecID id) { return ::avcodec_find_decoder(id); }
++ virtual AVCodec *avcodec_find_encoder(enum AVCodecID id) { return ::avcodec_find_encoder(id); }
+ virtual int avcodec_close(AVCodecContext *avctx)
+ {
+ CSingleLock lock(DllAvCodec::m_critSection);
+@@ -203,8 +203,8 @@
+ LOAD_SYMBOLS();
+
+ DEFINE_METHOD0(void, avcodec_register_all_dont_call)
+- DEFINE_METHOD1(AVCodec*, avcodec_find_decoder, (enum CodecID p1))
+- DEFINE_METHOD1(AVCodec*, avcodec_find_encoder, (enum CodecID p1))
++ DEFINE_METHOD1(AVCodec*, avcodec_find_decoder, (enum AVCodecID p1))
++ DEFINE_METHOD1(AVCodec*, avcodec_find_encoder, (enum AVCodecID p1))
+ DEFINE_METHOD1(int, avcodec_close_dont_call, (AVCodecContext *p1))
+ DEFINE_METHOD0(AVFrame*, avcodec_alloc_frame)
+ DEFINE_METHOD5(int, avpicture_fill, (AVPicture *p1, uint8_t *p2, PixelFormat p3, int p4, int p5))
+diff -urN xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cdrip/EncoderFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cdrip/EncoderFFmpeg.cpp 2013-08-03 15:17:18.828959790 +1100
+@@ -67,7 +67,7 @@
+
+ AVCodec *codec;
+ codec = m_dllAvCodec.avcodec_find_encoder(
+- strcmp(fmt->name, "ogg") == 0 ? CODEC_ID_VORBIS : fmt->audio_codec
++ strcmp(fmt->name, "ogg") == 0 ? AV_CODEC_ID_VORBIS : fmt->audio_codec
+ );
+
+ if (!codec)
+diff -urN xbmc-12.2-orig/xbmc/cores/amlplayer/AMLPlayer.cpp xbmc-12.2-avcodec/xbmc/cores/amlplayer/AMLPlayer.cpp
+--- xbmc-12.2-orig/xbmc/cores/amlplayer/AMLPlayer.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/amlplayer/AMLPlayer.cpp 2013-08-03 15:17:18.830959823 +1100
+@@ -387,16 +387,16 @@
+
+ /* TODO: handle other subtitle codec types
+ // subtitle codecs
+- CODEC_ID_DVD_SUBTITLE= 0x17000,
+- CODEC_ID_DVB_SUBTITLE,
+- CODEC_ID_TEXT, ///< raw UTF-8 text
+- CODEC_ID_XSUB,
+- CODEC_ID_SSA,
+- CODEC_ID_MOV_TEXT,
+- CODEC_ID_HDMV_PGS_SUBTITLE,
+- CODEC_ID_DVB_TELETEXT,
+- CODEC_ID_SRT,
+- CODEC_ID_MICRODVD,
++ AV_CODEC_ID_DVD_SUBTITLE= 0x17000,
++ AV_CODEC_ID_DVB_SUBTITLE,
++ AV_CODEC_ID_TEXT, ///< raw UTF-8 text
++ AV_CODEC_ID_XSUB,
++ AV_CODEC_ID_SSA,
++ AV_CODEC_ID_MOV_TEXT,
++ AV_CODEC_ID_HDMV_PGS_SUBTITLE,
++ AV_CODEC_ID_DVB_TELETEXT,
++ AV_CODEC_ID_SRT,
++ AV_CODEC_ID_MICRODVD,
+ */
+ switch(sub_type)
+ {
+@@ -405,12 +405,12 @@
+ "sub_type(0x%x), size(%d), bgntime(%lld), endtime(%lld), string(%s)",
+ sub_type, sub_size-20, subtitle->bgntime, subtitle->endtime, &sub_buffer[20]);
+ break;
+- case CODEC_ID_TEXT:
++ case AV_CODEC_ID_TEXT:
+ subtitle->bgntime = sub_pts/ 90;
+ subtitle->endtime = subtitle->bgntime + 4000;
+ subtitle->string = &sub_buffer[20];
+ break;
+- case CODEC_ID_SSA:
++ case AV_CODEC_ID_SSA:
+ if (strncmp((const char*)&sub_buffer[20], "Dialogue:", 9) == 0)
+ {
+ int vars_found, hour1, min1, sec1, hunsec1, hour2, min2, sec2, hunsec2, nothing;
+diff -urN xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp 2013-08-03 15:17:18.829959807 +1100
+@@ -109,7 +109,7 @@
+ if (dts && (!ac3 || g_advancedSettings.m_audioTranscodeTo.Equals("dts")))
+ {
+ m_CodecName = "DTS";
+- m_CodecID = CODEC_ID_DTS;
++ m_CodecID = AV_CODEC_ID_DTS;
+ m_PackFunc = &CAEPackIEC61937::PackDTS_1024;
+ m_BitRate = DTS_ENCODE_BITRATE;
+ codec = m_dllAvCodec.avcodec_find_encoder(m_CodecID);
+@@ -120,7 +120,7 @@
+ if (!codec && ac3)
+ {
+ m_CodecName = "AC3";
+- m_CodecID = CODEC_ID_AC3;
++ m_CodecID = AV_CODEC_ID_AC3;
+ m_PackFunc = &CAEPackIEC61937::PackAC3;
+ m_BitRate = AC3_ENCODE_BITRATE;
+ codec = m_dllAvCodec.avcodec_find_encoder(m_CodecID);
+@@ -226,7 +226,7 @@
+ return m_BitRate;
+ }
+
+-CodecID CAEEncoderFFmpeg::GetCodecID()
++AVCodecID CAEEncoderFFmpeg::GetCodecID()
+ {
+ return m_CodecID;
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h
+--- xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h 2013-08-03 15:17:18.829959807 +1100
+@@ -39,7 +39,7 @@
+ virtual void Reset();
+
+ virtual unsigned int GetBitRate ();
+- virtual CodecID GetCodecID ();
++ virtual AVCodecID GetCodecID ();
+ virtual unsigned int GetFrames ();
+
+ virtual int Encode (float *data, unsigned int frames);
+@@ -51,7 +51,7 @@
+ DllAvUtil m_dllAvUtil;
+
+ std::string m_CodecName;
+- CodecID m_CodecID;
++ AVCodecID m_CodecID;
+ unsigned int m_BitRate;
+ CAEPackIEC61937::PackFunc m_PackFunc;
+
+diff -urN xbmc-12.2-orig/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h
+--- xbmc-12.2-orig/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h 2013-08-03 15:17:18.829959807 +1100
+@@ -64,10 +64,10 @@
+ virtual unsigned int GetBitRate() = 0;
+
+ /**
+- * Returns the CodecID of the encoder
++ * Returns the AVCodecID of the encoder
+ * @return the ffmpeg codec id
+ */
+- virtual CodecID GetCodecID() = 0;
++ virtual AVCodecID GetCodecID() = 0;
+
+ /**
+ * Return the number of frames needed to encode
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.cpp 2013-08-03 15:17:18.830959823 +1100
+@@ -116,7 +116,7 @@
+ free(m_pBuffer);
+ }
+
+-bool CDVDAudio::Create(const DVDAudioFrame &audioframe, CodecID codec, bool needresampler)
++bool CDVDAudio::Create(const DVDAudioFrame &audioframe, AVCodecID codec, bool needresampler)
+ {
+ CLog::Log(LOGNOTICE,
+ "Creating audio stream (codec id: %i, channels: %i, sample rate: %i, %s)",
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.h 2013-08-03 15:17:18.830959823 +1100
+@@ -80,7 +80,7 @@
+ float GetCurrentAttenuation();
+ void Pause();
+ void Resume();
+- bool Create(const DVDAudioFrame &audioframe, CodecID codec, bool needresampler);
++ bool Create(const DVDAudioFrame &audioframe, AVCodecID codec, bool needresampler);
+ bool IsValidFormat(const DVDAudioFrame &audioframe);
+ void Destroy();
+ DWORD AddPackets(const DVDAudioFrame &audioframe);
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp 2013-08-03 15:17:18.831959839 +1100
+@@ -23,7 +23,7 @@
+
+ CDVDAudioCodecLPcm::CDVDAudioCodecLPcm() : CDVDAudioCodecPcm()
+ {
+- m_codecID = CODEC_ID_NONE;
++ m_codecID = AV_CODEC_ID_NONE;
+ m_bufferSize = LPCM_BUFFER_SIZE;
+ memset(m_buffer, 0, sizeof(m_buffer));
+ }
+@@ -33,11 +33,11 @@
+ m_codecID = hints.codec;
+
+ CDVDStreamInfo hints2(hints, true);
+- hints2.codec = CODEC_ID_NONE;
++ hints2.codec = AV_CODEC_ID_NONE;
+ #if 0
+- if (hints.codecID = CODEC_ID_LPCM_S24BE) hints2.codec = CODEC_ID_PCM_S24BE;
++ if (hints.codecID = AV_CODEC_ID_LPCM_S24BE) hints2.codec = AV_CODEC_ID_PCM_S24BE;
+ #endif
+- if (hints2.codec != CODEC_ID_NONE)
++ if (hints2.codec != AV_CODEC_ID_NONE)
+ return CDVDAudioCodecPcm::Open(hints2, options);
+
+ return false;
+@@ -54,7 +54,7 @@
+ if (iSize >= 12)
+ {
+ #if 0
+- if (m_codecID == CODEC_ID_LPCM_S24BE)
++ if (m_codecID == AV_CODEC_ID_LPCM_S24BE)
+ #endif
+ {
+ for (iDecoded = 0; iDecoded <= (iSize - 12); iDecoded += 12)
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-08-03 15:17:18.831959839 +1100
+@@ -40,5 +40,5 @@
+ int m_bufferSize;
+ BYTE m_buffer[LPCM_BUFFER_SIZE];
+
+- CodecID m_codecID;
++ AVCodecID m_codecID;
+ };
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp 2013-08-03 15:17:18.831959839 +1100
+@@ -67,12 +67,12 @@
+ m_bufferSize = 0;
+
+ if (
+- (hints.codec == CODEC_ID_AC3 && bSupportsAC3Out) ||
+- (hints.codec == CODEC_ID_DTS && bSupportsDTSOut) ||
++ (hints.codec == AV_CODEC_ID_AC3 && bSupportsAC3Out) ||
++ (hints.codec == AV_CODEC_ID_DTS && bSupportsDTSOut) ||
+ (audioMode == AUDIO_HDMI &&
+ (
+- (hints.codec == CODEC_ID_EAC3 && bSupportsAC3Out ) ||
+- (hints.codec == CODEC_ID_TRUEHD && bSupportsTrueHDOut)
++ (hints.codec == AV_CODEC_ID_EAC3 && bSupportsAC3Out ) ||
++ (hints.codec == AV_CODEC_ID_TRUEHD && bSupportsTrueHDOut)
+ )
+ )
+ )
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp 2013-08-03 15:17:18.832959856 +1100
+@@ -139,7 +139,7 @@
+
+ /* set the stream's parameters */
+ m_SampleRate = hints.samplerate;
+- if(!m_SampleRate && hints.codec == CODEC_ID_AC3)
++ if(!m_SampleRate && hints.codec == AV_CODEC_ID_AC3)
+ m_SampleRate = 48000;
+
+ AVCodecContext *codec = muxer.m_pStream->codec;
+@@ -277,9 +277,9 @@
+ {
+ m_pSyncFrame = NULL;
+
+- if (m_bSupportsAC3Out && hints.codec == CODEC_ID_AC3) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAC3;
+- else if (m_bSupportsDTSOut && hints.codec == CODEC_ID_DTS) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncDTS;
+- else if (m_bSupportsAACOut && hints.codec == CODEC_ID_AAC) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAAC;
++ if (m_bSupportsAC3Out && hints.codec == AV_CODEC_ID_AC3) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAC3;
++ else if (m_bSupportsDTSOut && hints.codec == AV_CODEC_ID_DTS) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncDTS;
++ else if (m_bSupportsAACOut && hints.codec == AV_CODEC_ID_AAC) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAAC;
+ else return false;
+
+ return true;
+@@ -328,7 +328,7 @@
+ else
+ {
+ /* aac needs to be wrapped into ADTS frames */
+- if (hints.codec == CODEC_ID_AAC)
++ if (hints.codec == AV_CODEC_ID_AAC)
+ if (!SetupMuxer(hints, "adts", m_ADTS))
+ {
+ CLog::Log(LOGERROR, "CDVDAudioCodecPassthroughFFmpeg::Open - Unable to setup ADTS muxer");
+@@ -481,8 +481,8 @@
+ {
+ switch(m_codec)
+ {
+- case CODEC_ID_AC3: return AE_FMT_AC3;
+- case CODEC_ID_DTS: return AE_FMT_DTS;
++ case AV_CODEC_ID_AC3: return AE_FMT_AC3;
++ case AV_CODEC_ID_DTS: return AE_FMT_DTS;
+ default:
+ return AE_FMT_INVALID; //Unknown stream type
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-08-03 15:17:18.832959856 +1100
+@@ -94,7 +94,7 @@
+ unsigned int m_Needed;
+ bool m_LostSync;
+ int m_SampleRate;
+- CodecID m_codec;
++ AVCodecID m_codec;
+
+ unsigned int (CDVDAudioCodecPassthroughFFmpeg::*m_pSyncFrame)(BYTE* pData, unsigned int iSize, unsigned int *fSize);
+ unsigned int SyncAC3(BYTE* pData, unsigned int iSize, unsigned int *fSize);
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-08-03 15:17:18.832959856 +1100
+@@ -113,7 +113,7 @@
+ m_iSourceSampleRate = 0;
+ m_iSourceBitrate = 0;
+ m_decodedDataSize = 0;
+- m_codecID = CODEC_ID_NONE;
++ m_codecID = AV_CODEC_ID_NONE;
+ m_iOutputChannels = 0;
+
+ memset(m_decodedData, 0, sizeof(m_decodedData));
+@@ -136,12 +136,12 @@
+
+ switch (m_codecID)
+ {
+- case CODEC_ID_PCM_ALAW:
++ case AV_CODEC_ID_PCM_ALAW:
+ {
+ for (int i = 0; i < 256; i++) table[i] = alaw2linear(i);
+ break;
+ }
+- case CODEC_ID_PCM_MULAW:
++ case AV_CODEC_ID_PCM_MULAW:
+ {
+ for (int i = 0; i < 256; i++) table[i] = ulaw2linear(i);
+ break;
+@@ -177,31 +177,31 @@
+
+ switch (m_codecID)
+ {
+- case CODEC_ID_PCM_S32LE:
++ case AV_CODEC_ID_PCM_S32LE:
+ decode_to16(4, 1, 0, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_S32BE:
++ case AV_CODEC_ID_PCM_S32BE:
+ decode_to16(4, 0, 0, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_U32LE:
++ case AV_CODEC_ID_PCM_U32LE:
+ decode_to16(4, 1, 1, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_U32BE:
++ case AV_CODEC_ID_PCM_U32BE:
+ decode_to16(4, 0, 1, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_S24LE:
++ case AV_CODEC_ID_PCM_S24LE:
+ decode_to16(3, 1, 0, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_S24BE:
++ case AV_CODEC_ID_PCM_S24BE:
+ decode_to16(3, 0, 0, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_U24LE:
++ case AV_CODEC_ID_PCM_U24LE:
+ decode_to16(3, 1, 1, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_U24BE:
++ case AV_CODEC_ID_PCM_U24BE:
+ decode_to16(3, 0, 1, &src, &samples, buf_size);
+ break;
+- case CODEC_ID_PCM_S24DAUD:
++ case AV_CODEC_ID_PCM_S24DAUD:
+ n = buf_size / 3;
+ for(;n>0;n--) {
+ uint32_t v = src[0] << 16 | src[1] << 8 | src[2];
+@@ -211,50 +211,50 @@
+ src += 3;
+ }
+ break;
+- case CODEC_ID_PCM_S16LE:
++ case AV_CODEC_ID_PCM_S16LE:
+ n = buf_size >> 1;
+ for(;n>0;n--) {
+ *samples++ = src[0] | (src[1] << 8);
+ src += 2;
+ }
+ break;
+- case CODEC_ID_PCM_S16BE:
++ case AV_CODEC_ID_PCM_S16BE:
+ n = buf_size >> 1;
+ for(;n>0;n--) {
+ *samples++ = (src[0] << 8) | src[1];
+ src += 2;
+ }
+ break;
+- case CODEC_ID_PCM_U16LE:
++ case AV_CODEC_ID_PCM_U16LE:
+ n = buf_size >> 1;
+ for(;n>0;n--) {
+ *samples++ = (src[0] | (src[1] << 8)) - 0x8000;
+ src += 2;
+ }
+ break;
+- case CODEC_ID_PCM_U16BE:
++ case AV_CODEC_ID_PCM_U16BE:
+ n = buf_size >> 1;
+ for(;n>0;n--) {
+ *samples++ = ((src[0] << 8) | src[1]) - 0x8000;
+ src += 2;
+ }
+ break;
+- case CODEC_ID_PCM_S8:
++ case AV_CODEC_ID_PCM_S8:
+ n = buf_size;
+ for(;n>0;n--) {
+ *samples++ = src[0] << 8;
+ src++;
+ }
+ break;
+- case CODEC_ID_PCM_U8:
++ case AV_CODEC_ID_PCM_U8:
+ n = buf_size;
+ for(;n>0;n--) {
+ *samples++ = ((int)src[0] - 128) << 8;
+ src++;
+ }
+ break;
+- case CODEC_ID_PCM_ALAW:
+- case CODEC_ID_PCM_MULAW:
++ case AV_CODEC_ID_PCM_ALAW:
++ case AV_CODEC_ID_PCM_MULAW:
+ n = buf_size;
+ for(;n>0;n--) {
+ *samples++ = table[src[0]];
+@@ -281,7 +281,7 @@
+ m_iSourceSampleRate = 0;
+ m_iSourceBitrate = 0;
+ m_decodedDataSize = 0;
+- m_codecID = CODEC_ID_NONE;
++ m_codecID = AV_CODEC_ID_NONE;
+ }
+
+ void CDVDAudioCodecPcm::Reset()
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h 2013-08-03 15:17:18.832959856 +1100
+@@ -44,7 +44,7 @@
+ short m_decodedData[131072]; // could be a bit to big
+ int m_decodedDataSize;
+
+- CodecID m_codecID;
++ AVCodecID m_codecID;
+ int m_iSourceSampleRate;
+ int m_iSourceChannels;
+ int m_iSourceBitrate;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp 2013-08-03 15:21:00.992633897 +1100
+@@ -173,7 +173,7 @@
+ CLog::Log(LOGDEBUG, "CDVDFactoryCodec: compiled in hardware support: %s", hwSupport.c_str());
+
+ // dvd's have weird still-frames in it, which is not fully supported in ffmpeg
+- if(hint.stills && (hint.codec == CODEC_ID_MPEG2VIDEO || hint.codec == CODEC_ID_MPEG1VIDEO))
++ if(hint.stills && (hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_MPEG1VIDEO))
+ {
+ if( (pCodec = OpenCodec(new CDVDVideoCodecLibMpeg2(), hint, options)) ) return pCodec;
+ }
+@@ -182,7 +182,7 @@
+ {
+ if (g_sysinfo.HasVDADecoder())
+ {
+- if (hint.codec == CODEC_ID_H264 && !hint.ptsinvalid)
++ if (hint.codec == AV_CODEC_ID_H264 && !hint.ptsinvalid)
+ {
+ if ( (pCodec = OpenCodec(new CDVDVideoCodecVDA(), hint, options)) ) return pCodec;
+ }
+@@ -197,8 +197,8 @@
+ {
+ switch(hint.codec)
+ {
+- case CODEC_ID_H264:
+- if (hint.codec == CODEC_ID_H264 && hint.ptsinvalid)
++ case AV_CODEC_ID_H264:
++ if (hint.codec == AV_CODEC_ID_H264 && hint.ptsinvalid)
+ break;
+ if ( (pCodec = OpenCodec(new CDVDVideoCodecVideoToolBox(), hint, options)) ) return pCodec;
+ break;
+@@ -216,13 +216,13 @@
+ {
+ switch(hint.codec)
+ {
+- case CODEC_ID_VC1:
+- case CODEC_ID_WMV3:
+- case CODEC_ID_H264:
+- case CODEC_ID_MPEG2VIDEO:
+- if (hint.codec == CODEC_ID_H264 && hint.ptsinvalid)
++ case AV_CODEC_ID_VC1:
++ case AV_CODEC_ID_WMV3:
++ case AV_CODEC_ID_H264:
++ case AV_CODEC_ID_MPEG2VIDEO:
++ if (hint.codec == AV_CODEC_ID_H264 && hint.ptsinvalid)
+ break;
+- if (hint.codec == CODEC_ID_MPEG2VIDEO && hint.width <= 720)
++ if (hint.codec == AV_CODEC_ID_MPEG2VIDEO && hint.width <= 720)
+ break;
+ if ( (pCodec = OpenCodec(new CDVDVideoCodecCrystalHD(), hint, options)) ) return pCodec;
+ break;
+@@ -236,7 +236,7 @@
+ #if defined(HAVE_LIBOPENMAX)
+ if (g_guiSettings.GetBool("videoplayer.useomx") && !hint.software )
+ {
+- if (hint.codec == CODEC_ID_H264 || hint.codec == CODEC_ID_MPEG2VIDEO || hint.codec == CODEC_ID_VC1)
++ if (hint.codec == AV_CODEC_ID_H264 || hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_VC1)
+ {
+ if ( (pCodec = OpenCodec(new CDVDVideoCodecOpenMax(), hint, options)) ) return pCodec;
+ }
+@@ -271,8 +271,8 @@
+ #if defined(TARGET_DARWIN_OSX) || defined(TARGET_DARWIN_IOS)
+ switch(hint.codec)
+ {
+- case CODEC_ID_AC3:
+- case CODEC_ID_DTS:
++ case AV_CODEC_ID_AC3:
++ case AV_CODEC_ID_DTS:
+ pCodec = OpenCodec( new CDVDAudioCodecPassthroughFFmpeg(), hint, options );
+ if( pCodec ) return pCodec;
+ break;
+@@ -286,39 +286,39 @@
+
+ switch (hint.codec)
+ {
+- case CODEC_ID_MP2:
+- case CODEC_ID_MP3:
++ case AV_CODEC_ID_MP2:
++ case AV_CODEC_ID_MP3:
+ {
+ pCodec = OpenCodec( new CDVDAudioCodecLibMad(), hint, options );
+ if( pCodec ) return pCodec;
+ break;
+ }
+- case CODEC_ID_PCM_S32LE:
+- case CODEC_ID_PCM_S32BE:
+- case CODEC_ID_PCM_U32LE:
+- case CODEC_ID_PCM_U32BE:
+- case CODEC_ID_PCM_S24LE:
+- case CODEC_ID_PCM_S24BE:
+- case CODEC_ID_PCM_U24LE:
+- case CODEC_ID_PCM_U24BE:
+- case CODEC_ID_PCM_S24DAUD:
+- case CODEC_ID_PCM_S16LE:
+- case CODEC_ID_PCM_S16BE:
+- case CODEC_ID_PCM_U16LE:
+- case CODEC_ID_PCM_U16BE:
+- case CODEC_ID_PCM_S8:
+- case CODEC_ID_PCM_U8:
+- case CODEC_ID_PCM_ALAW:
+- case CODEC_ID_PCM_MULAW:
++ case AV_CODEC_ID_PCM_S32LE:
++ case AV_CODEC_ID_PCM_S32BE:
++ case AV_CODEC_ID_PCM_U32LE:
++ case AV_CODEC_ID_PCM_U32BE:
++ case AV_CODEC_ID_PCM_S24LE:
++ case AV_CODEC_ID_PCM_S24BE:
++ case AV_CODEC_ID_PCM_U24LE:
++ case AV_CODEC_ID_PCM_U24BE:
++ case AV_CODEC_ID_PCM_S24DAUD:
++ case AV_CODEC_ID_PCM_S16LE:
++ case AV_CODEC_ID_PCM_S16BE:
++ case AV_CODEC_ID_PCM_U16LE:
++ case AV_CODEC_ID_PCM_U16BE:
++ case AV_CODEC_ID_PCM_S8:
++ case AV_CODEC_ID_PCM_U8:
++ case AV_CODEC_ID_PCM_ALAW:
++ case AV_CODEC_ID_PCM_MULAW:
+ {
+ pCodec = OpenCodec( new CDVDAudioCodecPcm(), hint, options );
+ if( pCodec ) return pCodec;
+ break;
+ }
+ #if 0
+- //case CODEC_ID_LPCM_S16BE:
+- //case CODEC_ID_LPCM_S20BE:
+- case CODEC_ID_LPCM_S24BE:
++ //case AV_CODEC_ID_LPCM_S16BE:
++ //case AV_CODEC_ID_LPCM_S20BE:
++ case AV_CODEC_ID_LPCM_S24BE:
+ {
+ pCodec = OpenCodec( new CDVDAudioCodecLPcm(), hint, options );
+ if( pCodec ) return pCodec;
+@@ -345,12 +345,12 @@
+
+ switch (hint.codec)
+ {
+- case CODEC_ID_TEXT:
++ case AV_CODEC_ID_TEXT:
+ pCodec = OpenCodec(new CDVDOverlayCodecText(), hint, options);
+ if( pCodec ) return pCodec;
+ break;
+
+- case CODEC_ID_SSA:
++ case AV_CODEC_ID_SSA:
+ pCodec = OpenCodec(new CDVDOverlayCodecSSA(), hint, options);
+ if( pCodec ) return pCodec;
+
+@@ -358,7 +358,7 @@
+ if( pCodec ) return pCodec;
+ break;
+
+- case CODEC_ID_MOV_TEXT:
++ case AV_CODEC_ID_MOV_TEXT:
+ pCodec = OpenCodec(new CDVDOverlayCodecTX3G(), hint, options);
+ if( pCodec ) return pCodec;
+ break;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-08-03 15:17:18.833959872 +1100
+@@ -182,7 +182,7 @@
+
+ double pts_offset = 0.0;
+
+- if (m_pCodecContext->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE && m_Subtitle.format == 0)
++ if (m_pCodecContext->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE && m_Subtitle.format == 0)
+ {
+ // for pgs subtitles the packet pts of the end_segments are wrong
+ // instead use the subtitle pts to calc the offset here
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp 2013-08-03 15:17:18.834959888 +1100
+@@ -44,7 +44,7 @@
+
+ bool CDVDOverlayCodecSSA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
+ {
+- if(hints.codec != CODEC_ID_SSA)
++ if(hints.codec != AV_CODEC_ID_SSA)
+ return false;
+
+ Dispose();
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp 2013-08-03 15:17:18.834959888 +1100
+@@ -41,8 +41,8 @@
+
+ bool CDVDOverlayCodecText::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
+ {
+- m_bIsSSA = (hints.codec == CODEC_ID_SSA);
+- if(hints.codec == CODEC_ID_TEXT || hints.codec == CODEC_ID_SSA)
++ m_bIsSSA = (hints.codec == AV_CODEC_ID_SSA);
++ if(hints.codec == AV_CODEC_ID_TEXT || hints.codec == AV_CODEC_ID_SSA)
+ return true;
+ return false;
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp 2013-08-03 15:17:18.834959888 +1100
+@@ -75,7 +75,7 @@
+
+ bool CDVDOverlayCodecTX3G::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
+ {
+- if (hints.codec == CODEC_ID_MOV_TEXT)
++ if (hints.codec == AV_CODEC_ID_MOV_TEXT)
+ return true;
+ return false;
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp 2013-08-03 15:17:37.594265411 +1100
+@@ -55,11 +55,11 @@
+ {
+ switch (hints.codec)
+ {
+- case CODEC_ID_MPEG2VIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO:
+ m_CodecType = CRYSTALHD_CODEC_ID_MPEG2;
+ m_pFormatName = "chd-mpeg2";
+ break;
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ switch(hints.profile)
+ {
+ case FF_PROFILE_H264_HIGH_10:
+@@ -86,11 +86,11 @@
+
+ m_pFormatName = "chd-h264";
+ break;
+- case CODEC_ID_VC1:
++ case AV_CODEC_ID_VC1:
+ m_CodecType = CRYSTALHD_CODEC_ID_VC1;
+ m_pFormatName = "chd-vc1";
+ break;
+- case CODEC_ID_WMV3:
++ case AV_CODEC_ID_WMV3:
+ m_CodecType = CRYSTALHD_CODEC_ID_WMV3;
+ m_pFormatName = "chd-wmv3";
+ break;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-08-03 15:24:40.439297445 +1100
+@@ -103,7 +103,7 @@
+ #ifdef HAVE_LIBVA
+ // mpeg4 vaapi decoding is disabled
+ if(*cur == PIX_FMT_VAAPI_VLD && g_guiSettings.GetBool("videoplayer.usevaapi")
+- && (avctx->codec_id != CODEC_ID_MPEG4 || g_advancedSettings.m_videoAllowMpeg4VAAPI))
++ && (avctx->codec_id != AV_CODEC_ID_MPEG4 || g_advancedSettings.m_videoAllowMpeg4VAAPI))
+ {
+ VAAPI::CDecoder* dec = new VAAPI::CDecoder();
+ if(dec->Open(avctx, *cur))
+@@ -176,7 +176,7 @@
+ pCodec = NULL;
+ m_pCodecContext = NULL;
+
+- if (hints.codec == CODEC_ID_H264)
++ if (hints.codec == AV_CODEC_ID_H264)
+ {
+ switch(hints.profile)
+ {
+@@ -200,7 +200,7 @@
+ if(pCodec->id == hints.codec
+ && pCodec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
+ {
+- if ((pCodec->id == CODEC_ID_MPEG4) && !g_advancedSettings.m_videoAllowMpeg4VDPAU)
++ if ((pCodec->id == AV_CODEC_ID_MPEG4) && !g_advancedSettings.m_videoAllowMpeg4VDPAU)
+ continue;
+
+ CLog::Log(LOGNOTICE,"CDVDVideoCodecFFmpeg::Open() Creating VDPAU(%ix%i, %d)",hints.width, hints.height, hints.codec);
+@@ -214,7 +214,7 @@
+ if(vdp->Open(m_pCodecContext, pCodec->pix_fmts ? pCodec->pix_fmts[0] : PIX_FMT_NONE))
+ {
+ m_pHardware = vdp;
+- m_pCodecContext->codec_id = CODEC_ID_NONE; // ffmpeg will complain if this has been set
++ m_pCodecContext->codec_id = AV_CODEC_ID_NONE; // ffmpeg will complain if this has been set
+ break;
+ }
+ m_dllAvUtil.av_freep(&m_pCodecContext);
+@@ -254,8 +254,8 @@
+ // ffmpeg with enabled neon will crash and burn if this is enabled
+ m_pCodecContext->flags &= CODEC_FLAG_EMU_EDGE;
+ #else
+- if (pCodec->id != CODEC_ID_H264 && pCodec->capabilities & CODEC_CAP_DR1
+- && pCodec->id != CODEC_ID_VP8
++ if (pCodec->id != AV_CODEC_ID_H264 && pCodec->capabilities & CODEC_CAP_DR1
++ && pCodec->id != AV_CODEC_ID_VP8
+ )
+ m_pCodecContext->flags |= CODEC_FLAG_EMU_EDGE;
+ #endif
+@@ -293,8 +293,8 @@
+
+ int num_threads = std::min(8 /*MAX_THREADS*/, g_cpuInfo.getCPUCount());
+ if( num_threads > 1 && !hints.software && m_pHardware == NULL // thumbnail extraction fails when run threaded
+- && ( pCodec->id == CODEC_ID_H264
+- || pCodec->id == CODEC_ID_MPEG4 ))
++ && ( pCodec->id == AV_CODEC_ID_H264
++ || pCodec->id == AV_CODEC_ID_MPEG4 ))
+ m_pCodecContext->thread_count = num_threads;
+
+ if (m_dllAvCodec.avcodec_open2(m_pCodecContext, pCodec, NULL) < 0)
+@@ -492,8 +492,8 @@
+ m_iLastKeyframe = 300;
+
+ /* h264 doesn't always have keyframes + won't output before first keyframe anyway */
+- if(m_pCodecContext->codec_id == CODEC_ID_H264
+- || m_pCodecContext->codec_id == CODEC_ID_SVQ3)
++ if(m_pCodecContext->codec_id == AV_CODEC_ID_H264
++ || m_pCodecContext->codec_id == AV_CODEC_ID_SVQ3)
+ m_started = true;
+
+ if(m_pHardware == NULL)
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp 2013-08-03 15:17:37.595265431 +1100
+@@ -58,7 +58,7 @@
+
+ switch (hints.codec)
+ {
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ {
+ m_pFormatName = "omx-h264";
+ if (hints.extrasize < 7 || hints.extradata == NULL)
+@@ -72,13 +72,13 @@
+ m_convert_bitstream = bitstream_convert_init(hints.extradata, hints.extrasize);
+ }
+ break;
+- case CODEC_ID_MPEG4:
++ case AV_CODEC_ID_MPEG4:
+ m_pFormatName = "omx-mpeg4";
+ break;
+- case CODEC_ID_MPEG2VIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO:
+ m_pFormatName = "omx-mpeg2";
+ break;
+- case CODEC_ID_VC1:
++ case AV_CODEC_ID_VC1:
+ m_pFormatName = "omx-vc1";
+ break;
+ default:
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp 2013-08-03 15:24:54.727535919 +1100
+@@ -697,7 +697,7 @@
+
+ switch (hints.codec)
+ {
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ // source must be H.264 with valid avcC atom data in extradata
+ if (extrasize < 7 || extradata == NULL)
+ {
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp 2013-08-03 15:17:37.597265487 +1100
+@@ -538,7 +538,7 @@
+ esds->esid = 0;
+ esds->stream_priority = 0; // 16 ? 0x1f
+
+- esds->objectTypeId = 32; // 32 = CODEC_ID_MPEG4, 33 = CODEC_ID_H264
++ esds->objectTypeId = 32; // 32 = AV_CODEC_ID_MPEG4, 33 = AV_CODEC_ID_H264
+ // the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio)
+ // plus 1 bit to indicate upstream and 1 bit set to 1 (reserved)
+ esds->streamType = 0x11;
+@@ -1095,7 +1095,7 @@
+
+ switch (hints.codec)
+ {
+- case CODEC_ID_MPEG4:
++ case AV_CODEC_ID_MPEG4:
+ if (extrasize)
+ {
+ AVIOContext *pb;
+@@ -1127,12 +1127,12 @@
+ m_pFormatName = "vtb-mpeg4";
+ break;
+
+- case CODEC_ID_MPEG2VIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO:
+ m_fmt_desc = CreateFormatDescription(kVTFormatMPEG2Video, width, height);
+ m_pFormatName = "vtb-mpeg2";
+ break;
+
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ if (extrasize < 7 || extradata == NULL)
+ {
+ //m_fmt_desc = CreateFormatDescription(kVTFormatH264, width, height);
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp 2013-08-03 15:17:37.597265487 +1100
+@@ -95,19 +95,19 @@
+
+ /* XXX Prefered modes must come first */
+ static const dxva2_mode_t dxva2_modes[] = {
+- { "MPEG2 VLD", &DXVA2_ModeMPEG2_VLD, CODEC_ID_MPEG2VIDEO },
+- { "MPEG1/2 VLD", &DXVA_ModeMPEG2and1_VLD, CODEC_ID_MPEG2VIDEO },
++ { "MPEG2 VLD", &DXVA2_ModeMPEG2_VLD, AV_CODEC_ID_MPEG2VIDEO },
++ { "MPEG1/2 VLD", &DXVA_ModeMPEG2and1_VLD, AV_CODEC_ID_MPEG2VIDEO },
+ { "MPEG2 MoComp", &DXVA2_ModeMPEG2_MoComp, 0 },
+ { "MPEG2 IDCT", &DXVA2_ModeMPEG2_IDCT, 0 },
+
+ // Intel drivers return standard modes in addition to the Intel specific ones. Try the Intel specific first, they work better for Sandy Bridges.
+- { "Intel H.264 VLD, no FGT", &DXVADDI_Intel_ModeH264_E, CODEC_ID_H264 },
++ { "Intel H.264 VLD, no FGT", &DXVADDI_Intel_ModeH264_E, AV_CODEC_ID_H264 },
+ { "Intel H.264 inverse discrete cosine transform (IDCT), no FGT", &DXVADDI_Intel_ModeH264_C, 0 },
+ { "Intel H.264 motion compensation (MoComp), no FGT", &DXVADDI_Intel_ModeH264_A, 0 },
+ { "Intel VC-1 VLD", &DXVADDI_Intel_ModeVC1_E, 0 },
+
+- { "H.264 variable-length decoder (VLD), FGT", &DXVA2_ModeH264_F, CODEC_ID_H264 },
+- { "H.264 VLD, no FGT", &DXVA2_ModeH264_E, CODEC_ID_H264 },
++ { "H.264 variable-length decoder (VLD), FGT", &DXVA2_ModeH264_F, AV_CODEC_ID_H264 },
++ { "H.264 VLD, no FGT", &DXVA2_ModeH264_E, AV_CODEC_ID_H264 },
+ { "H.264 IDCT, FGT", &DXVA2_ModeH264_D, 0, },
+ { "H.264 inverse discrete cosine transform (IDCT), no FGT", &DXVA2_ModeH264_C, 0, },
+ { "H.264 MoComp, FGT", &DXVA2_ModeH264_B, 0, },
+@@ -120,10 +120,10 @@
+ { "Windows Media Video 9 MoComp", &DXVA2_ModeWMV9_B, 0 },
+ { "Windows Media Video 9 post processing", &DXVA2_ModeWMV9_A, 0 },
+
+- { "VC-1 VLD", &DXVA2_ModeVC1_D, CODEC_ID_VC1 },
+- { "VC-1 VLD", &DXVA2_ModeVC1_D, CODEC_ID_WMV3 },
+- { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, CODEC_ID_VC1 },
+- { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, CODEC_ID_WMV3 },
++ { "VC-1 VLD", &DXVA2_ModeVC1_D, AV_CODEC_ID_VC1 },
++ { "VC-1 VLD", &DXVA2_ModeVC1_D, AV_CODEC_ID_WMV3 },
++ { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, AV_CODEC_ID_VC1 },
++ { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, AV_CODEC_ID_WMV3 },
+ { "VC-1 IDCT", &DXVA2_ModeVC1_C, 0 },
+ { "VC-1 MoComp", &DXVA2_ModeVC1_B, 0 },
+ { "VC-1 post processing", &DXVA2_ModeVC1_A, 0 },
+@@ -435,7 +435,7 @@
+ static bool CheckCompatibility(AVCodecContext *avctx)
+ {
+ // The incompatibilities are all for H264
+- if(avctx->codec_id != CODEC_ID_H264)
++ if(avctx->codec_id != AV_CODEC_ID_H264)
+ return true;
+
+ // Macroblock width incompatibility
+@@ -626,7 +626,7 @@
+
+ if(m_refs == 0)
+ {
+- if(avctx->codec_id == CODEC_ID_H264)
++ if(avctx->codec_id == AV_CODEC_ID_H264)
+ m_refs = 16;
+ else
+ m_refs = 2;
+@@ -771,9 +771,9 @@
+ }
+
+ // Status reports are available only for the DXVA2_ModeH264 and DXVA2_ModeVC1 modes
+- if(avctx->codec_id != CODEC_ID_H264
+- && avctx->codec_id != CODEC_ID_VC1
+- && avctx->codec_id != CODEC_ID_WMV3)
++ if(avctx->codec_id != AV_CODEC_ID_H264
++ && avctx->codec_id != AV_CODEC_ID_VC1
++ && avctx->codec_id != AV_CODEC_ID_WMV3)
+ return 0;
+
+ DXVA2_DecodeExecuteParams params = {};
+@@ -786,7 +786,7 @@
+ params.pExtensionData = &data;
+ data.Function = DXVA_STATUS_REPORTING_FUNCTION;
+ data.pPrivateOutputData = &status;
+- data.PrivateOutputDataSize = avctx->codec_id == CODEC_ID_H264 ? sizeof(DXVA_Status_H264) : sizeof(DXVA_Status_VC1);
++ data.PrivateOutputDataSize = avctx->codec_id == AV_CODEC_ID_H264 ? sizeof(DXVA_Status_H264) : sizeof(DXVA_Status_VC1);
+ HRESULT hr;
+ if(FAILED( hr = m_decoder->Execute(&params)))
+ {
+@@ -794,7 +794,7 @@
+ return VC_ERROR;
+ }
+
+- if(avctx->codec_id == CODEC_ID_H264)
++ if(avctx->codec_id == AV_CODEC_ID_H264)
+ {
+ if(status.h264.bStatus)
+ CLog::Log(LOGWARNING, "DXVA - decoder problem of status %d with %d", status.h264.bStatus, status.h264.bBufType);
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp 2013-08-03 15:17:37.598265512 +1100
+@@ -115,7 +115,7 @@
+
+ switch (hints.codec)
+ {
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ {
+ switch(hints.profile)
+ {
+@@ -140,7 +140,7 @@
+ }
+ }
+ break;
+- case CODEC_ID_MPEG4:
++ case AV_CODEC_ID_MPEG4:
+ // (role name) video_decoder.mpeg4
+ // MPEG-4, DivX 4/5 and Xvid compatible
+ decoder_name = OMX_MPEG4_DECODER;
+@@ -154,12 +154,12 @@
+ m_pFormatName = "omx-mpeg4";
+ break;
+ */
+- case CODEC_ID_MPEG2VIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO:
+ // (role name) video_decoder.mpeg2
+ // MPEG-2
+ decoder_name = OMX_MPEG2V_DECODER;
+ break;
+- case CODEC_ID_VC1:
++ case AV_CODEC_ID_VC1:
+ // (role name) video_decoder.vc1
+ // VC-1, WMV9
+ decoder_name = OMX_VC1_DECODER;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2013-08-03 15:17:37.598265512 +1100
+@@ -268,14 +268,14 @@
+
+ vector<VAProfile> accepted;
+ switch (avctx->codec_id) {
+- case CODEC_ID_MPEG2VIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO:
+ accepted.push_back(VAProfileMPEG2Main);
+ break;
+- case CODEC_ID_MPEG4:
+- case CODEC_ID_H263:
++ case AV_CODEC_ID_MPEG4:
++ case AV_CODEC_ID_H263:
+ accepted.push_back(VAProfileMPEG4AdvancedSimple);
+ break;
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ {
+ #ifdef FF_PROFILE_H264_BASELINE
+ if (avctx->profile == FF_PROFILE_H264_BASELINE)
+@@ -294,10 +294,10 @@
+ }
+ break;
+ }
+- case CODEC_ID_WMV3:
++ case AV_CODEC_ID_WMV3:
+ accepted.push_back(VAProfileVC1Main);
+ break;
+- case CODEC_ID_VC1:
++ case AV_CODEC_ID_VC1:
+ accepted.push_back(VAProfileVC1Advanced);
+ break;
+ default:
+@@ -383,7 +383,7 @@
+ m_refs = avctx->refs;
+ if(m_refs == 0)
+ {
+- if(avctx->codec_id == CODEC_ID_H264)
++ if(avctx->codec_id == AV_CODEC_ID_H264)
+ m_refs = 16;
+ else
+ m_refs = 2;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2013-08-03 15:25:15.336879885 +1100
+@@ -184,10 +184,10 @@
+ SpewHardwareAvailable();
+
+ VdpDecoderProfile profile = 0;
+- if(avctx->codec_id == CODEC_ID_H264)
++ if(avctx->codec_id == AV_CODEC_ID_H264)
+ profile = VDP_DECODER_PROFILE_H264_HIGH;
+ #ifdef VDP_DECODER_PROFILE_MPEG4_PART2_ASP
+- else if(avctx->codec_id == CODEC_ID_MPEG4)
++ else if(avctx->codec_id == AV_CODEC_ID_MPEG4)
+ profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
+ #endif
+ if(profile)
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp 2013-08-03 15:17:37.600265539 +1100
+@@ -90,7 +90,7 @@
+ m_stream->iBitRate = m_header.sampleRate * m_header.channels * m_header.bitsPerSample;
+ m_stream->iChannels = m_header.channels;
+ m_stream->type = STREAM_AUDIO;
+- m_stream->codec = CODEC_ID_PCM_S16LE;
++ m_stream->codec = AV_CODEC_ID_PCM_S16LE;
+
+ return true;
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp 2013-08-03 15:21:18.031918421 +1100
+@@ -31,8 +31,8 @@
+ {
+ char sInfo[64];
+
+- if (codec == CODEC_ID_AC3) strcpy(sInfo, "AC3 ");
+- else if (codec == CODEC_ID_DTS)
++ if (codec == AV_CODEC_ID_AC3) strcpy(sInfo, "AC3 ");
++ else if (codec == AV_CODEC_ID_DTS)
+ {
+ #ifdef FF_PROFILE_DTS_HD_MA
+ if (profile == FF_PROFILE_DTS_HD_MA)
+@@ -43,7 +43,7 @@
+ #endif
+ strcpy(sInfo, "DTS ");
+ }
+- else if (codec == CODEC_ID_MP2) strcpy(sInfo, "MP2 ");
++ else if (codec == AV_CODEC_ID_MP2) strcpy(sInfo, "MP2 ");
+ else strcpy(sInfo, "");
+
+ if (iChannels == 1) strcat(sInfo, "Mono");
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-08-03 15:23:36.700233526 +1100
+@@ -450,7 +450,7 @@
+ if (iErr < 0)
+ {
+ CLog::Log(LOGWARNING,"could not find codec parameters for %s", strFile.c_str());
+- if (m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD) || (m_pFormatContext->nb_streams == 1 && m_pFormatContext->streams[0]->codec->codec_id == CODEC_ID_AC3))
++ if (m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD) || (m_pFormatContext->nb_streams == 1 && m_pFormatContext->streams[0]->codec->codec_id == AV_CODEC_ID_AC3))
+ {
+ // special case, our codecs can still handle it.
+ }
+@@ -715,7 +715,7 @@
+ }
+
+ // we need to get duration slightly different for matroska embedded text subtitels
+- if(m_bMatroska && stream->codec->codec_id == CODEC_ID_TEXT && pkt.convergence_duration != 0)
++ if(m_bMatroska && stream->codec->codec_id == AV_CODEC_ID_TEXT && pkt.convergence_duration != 0)
+ pkt.duration = pkt.convergence_duration;
+
+ if(m_bAVI && stream->codec && stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+@@ -967,7 +967,7 @@
+ st->bVFR = false;
+
+ // never trust pts in avi files with h264.
+- if (m_bAVI && pStream->codec->codec_id == CODEC_ID_H264)
++ if (m_bAVI && pStream->codec->codec_id == AV_CODEC_ID_H264)
+ st->bPTSInvalid = true;
+
+ //average fps is more accurate for mkv files
+@@ -1008,15 +1008,15 @@
+
+ if ( m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD) )
+ {
+- if (pStream->codec->codec_id == CODEC_ID_PROBE)
++ if (pStream->codec->codec_id == AV_CODEC_ID_PROBE)
+ {
+- // fix MPEG-1/MPEG-2 video stream probe returning CODEC_ID_PROBE for still frames.
++ // fix MPEG-1/MPEG-2 video stream probe returning AV_CODEC_ID_PROBE for still frames.
+ // ffmpeg issue 1871, regression from ffmpeg r22831.
+ if ((pStream->id & 0xF0) == 0xE0)
+ {
+- pStream->codec->codec_id = CODEC_ID_MPEG2VIDEO;
++ pStream->codec->codec_id = AV_CODEC_ID_MPEG2VIDEO;
+ pStream->codec->codec_tag = MKTAG('M','P','2','V');
+- CLog::Log(LOGERROR, "%s - CODEC_ID_PROBE detected, forcing CODEC_ID_MPEG2VIDEO", __FUNCTION__);
++ CLog::Log(LOGERROR, "%s - AV_CODEC_ID_PROBE detected, forcing AV_CODEC_ID_MPEG2VIDEO", __FUNCTION__);
+ }
+ }
+ }
+@@ -1053,9 +1053,9 @@
+ }
+ case AVMEDIA_TYPE_ATTACHMENT:
+ { //mkv attachments. Only bothering with fonts for now.
+- if(pStream->codec->codec_id == CODEC_ID_TTF
++ if(pStream->codec->codec_id == AV_CODEC_ID_TTF
+ #if (!defined USE_EXTERNAL_FFMPEG)
+- || pStream->codec->codec_id == CODEC_ID_OTF
++ || pStream->codec->codec_id == AV_CODEC_ID_OTF
+ #endif
+ )
+ {
+@@ -1137,19 +1137,19 @@
+ // id's reported from libdvdnav
+ switch(m_streams[iId]->codec)
+ {
+- case CODEC_ID_AC3:
++ case AV_CODEC_ID_AC3:
+ m_streams[iId]->iPhysicalId = pStream->id - 128;
+ break;
+- case CODEC_ID_DTS:
++ case AV_CODEC_ID_DTS:
+ m_streams[iId]->iPhysicalId = pStream->id - 136;
+ break;
+- case CODEC_ID_MP2:
++ case AV_CODEC_ID_MP2:
+ m_streams[iId]->iPhysicalId = pStream->id - 448;
+ break;
+- case CODEC_ID_PCM_S16BE:
++ case AV_CODEC_ID_PCM_S16BE:
+ m_streams[iId]->iPhysicalId = pStream->id - 160;
+ break;
+- case CODEC_ID_DVD_SUBTITLE:
++ case AV_CODEC_ID_DVD_SUBTITLE:
+ m_streams[iId]->iPhysicalId = pStream->id - 0x20;
+ break;
+ default:
+@@ -1300,7 +1300,7 @@
+
+ #ifdef FF_PROFILE_DTS_HD_MA
+ /* use profile to determine the DTS type */
+- if (stream->codec == CODEC_ID_DTS)
++ if (stream->codec == AV_CODEC_ID_DTS)
+ {
+ if (stream->profile == FF_PROFILE_DTS_HD_MA)
+ strName = "dtshd_ma";
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-08-03 15:22:13.480844244 +1100
+@@ -35,7 +35,7 @@
+ #include "config.h"
+ #endif
+ #ifndef _LINUX
+-enum CodecID;
++enum AVCodecID;
+ #include <libavcodec/avcodec.h>
+ #else
+ extern "C" {
+@@ -88,7 +88,7 @@
+ {
+ iId = 0;
+ iPhysicalId = 0;
+- codec = (CodecID)0; // CODEC_ID_NONE
++ codec = (AVCodecID)0; // AV_CODEC_ID_NONE
+ codec_fourcc = 0;
+ profile = FF_PROFILE_UNKNOWN;
+ level = 0;
+@@ -118,7 +118,7 @@
+
+ int iId; // most of the time starting from 0
+ int iPhysicalId; // id
+- CodecID codec;
++ AVCodecID codec;
+ unsigned int codec_fourcc; // if available
+ int profile; // encoder profile of the stream reported by the decoder. used to qualify hw decoders.
+ int level; // encoder level of the stream reported by the decoder. used to qualify hw decoders.
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-08-03 15:17:39.181291285 +1100
+@@ -290,39 +290,39 @@
+
+ if(!strcmp(type, "AC3")) {
+ st.a = new CDemuxStreamAudioHTSP(this, type);
+- st.a->codec = CODEC_ID_AC3;
++ st.a->codec = AV_CODEC_ID_AC3;
+ } else if(!strcmp(type, "EAC3")) {
+ st.a = new CDemuxStreamAudioHTSP(this, type);
+- st.a->codec = CODEC_ID_EAC3;
++ st.a->codec = AV_CODEC_ID_EAC3;
+ } else if(!strcmp(type, "MPEG2AUDIO")) {
+ st.a = new CDemuxStreamAudioHTSP(this, type);
+- st.a->codec = CODEC_ID_MP2;
++ st.a->codec = AV_CODEC_ID_MP2;
+ } else if(!strcmp(type, "AAC")) {
+ st.a = new CDemuxStreamAudioHTSP(this, type);
+- st.a->codec = CODEC_ID_AAC;
++ st.a->codec = AV_CODEC_ID_AAC;
+ } else if(!strcmp(type, "MPEG2VIDEO")) {
+ st.v = new CDemuxStreamVideoHTSP(this, type);
+- st.v->codec = CODEC_ID_MPEG2VIDEO;
++ st.v->codec = AV_CODEC_ID_MPEG2VIDEO;
+ st.v->iWidth = htsmsg_get_u32_or_default(sub, "width" , 0);
+ st.v->iHeight = htsmsg_get_u32_or_default(sub, "height", 0);
+ } else if(!strcmp(type, "H264")) {
+ st.v = new CDemuxStreamVideoHTSP(this, type);
+- st.v->codec = CODEC_ID_H264;
++ st.v->codec = AV_CODEC_ID_H264;
+ st.v->iWidth = htsmsg_get_u32_or_default(sub, "width" , 0);
+ st.v->iHeight = htsmsg_get_u32_or_default(sub, "height", 0);
+ } else if(!strcmp(type, "DVBSUB")) {
+ st.s = new CDemuxStreamSubtitle();
+- st.s->codec = CODEC_ID_DVB_SUBTITLE;
++ st.s->codec = AV_CODEC_ID_DVB_SUBTITLE;
+ uint32_t composition_id = 0, ancillary_id = 0;
+ htsmsg_get_u32(sub, "composition_id", &composition_id);
+ htsmsg_get_u32(sub, "ancillary_id" , &ancillary_id);
+ st.s->identifier = (composition_id & 0xffff) | ((ancillary_id & 0xffff) << 16);
+ } else if(!strcmp(type, "TEXTSUB")) {
+ st.s = new CDemuxStreamSubtitle();
+- st.s->codec = CODEC_ID_TEXT;
++ st.s->codec = AV_CODEC_ID_TEXT;
+ } else if(!strcmp(type, "TELETEXT")) {
+ st.t = new CDemuxStreamTeletext();
+- st.t->codec = CODEC_ID_DVB_TELETEXT;
++ st.t->codec = AV_CODEC_ID_DVB_TELETEXT;
+ } else {
+ continue;
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-08-03 15:17:39.181291285 +1100
+@@ -60,10 +60,10 @@
+ {
+ switch (codec)
+ {
+- case CODEC_ID_MPEG2VIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO:
+ strInfo = "mpeg2video";
+ break;
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ strInfo = "h264";
+ break;
+ default:
+@@ -75,19 +75,19 @@
+ {
+ switch (codec)
+ {
+- case CODEC_ID_AC3:
++ case AV_CODEC_ID_AC3:
+ strInfo = "ac3";
+ break;
+- case CODEC_ID_EAC3:
++ case AV_CODEC_ID_EAC3:
+ strInfo = "eac3";
+ break;
+- case CODEC_ID_MP2:
++ case AV_CODEC_ID_MP2:
+ strInfo = "mpeg2audio";
+ break;
+- case CODEC_ID_AAC:
++ case AV_CODEC_ID_AAC:
+ strInfo = "aac";
+ break;
+- case CODEC_ID_DTS:
++ case AV_CODEC_ID_DTS:
+ strInfo = "dts";
+ break;
+ default:
+@@ -349,7 +349,7 @@
+ {
+ st = dynamic_cast<CDemuxStreamAudioPVRClient*>(stm);
+ if (!st
+- || (st->codec != (CodecID)props.stream[i].iCodecId)
++ || (st->codec != (AVCodecID)props.stream[i].iCodecId)
+ || (st->iChannels != props.stream[i].iChannels))
+ DisposeStream(i);
+ }
+@@ -375,7 +375,7 @@
+ {
+ st = dynamic_cast<CDemuxStreamVideoPVRClient*>(stm);
+ if (!st
+- || (st->codec != (CodecID)props.stream[i].iCodecId)
++ || (st->codec != (AVCodecID)props.stream[i].iCodecId)
+ || (st->iWidth != props.stream[i].iWidth)
+ || (st->iHeight != props.stream[i].iHeight))
+ DisposeStream(i);
+@@ -395,11 +395,11 @@
+ m_streams[i] = st;
+ st->m_parser_split = true;
+ }
+- else if (props.stream[i].iCodecId == CODEC_ID_DVB_TELETEXT)
++ else if (props.stream[i].iCodecId == AV_CODEC_ID_DVB_TELETEXT)
+ {
+ if (stm)
+ {
+- if (stm->codec != (CodecID)props.stream[i].iCodecId)
++ if (stm->codec != (AVCodecID)props.stream[i].iCodecId)
+ DisposeStream(i);
+ }
+ if (!m_streams[i])
+@@ -411,7 +411,7 @@
+ if (stm)
+ {
+ st = dynamic_cast<CDemuxStreamSubtitlePVRClient*>(stm);
+- if (!st || (st->codec != (CodecID)props.stream[i].iCodecId))
++ if (!st || (st->codec != (AVCodecID)props.stream[i].iCodecId))
+ DisposeStream(i);
+ }
+ if (!m_streams[i])
+@@ -428,7 +428,7 @@
+ m_streams[i] = new CDemuxStream();
+ }
+
+- m_streams[i]->codec = (CodecID)props.stream[i].iCodecId;
++ m_streams[i]->codec = (AVCodecID)props.stream[i].iCodecId;
+ m_streams[i]->iId = i;
+ m_streams[i]->iPhysicalId = props.stream[i].iPhysicalId;
+ m_streams[i]->language[0] = props.stream[i].strLanguage[0];
+@@ -475,19 +475,19 @@
+ CDemuxStream *stream = GetStream(iStreamId);
+ if (stream)
+ {
+- if (stream->codec == CODEC_ID_AC3)
++ if (stream->codec == AV_CODEC_ID_AC3)
+ strName = "ac3";
+- else if (stream->codec == CODEC_ID_MP2)
++ else if (stream->codec == AV_CODEC_ID_MP2)
+ strName = "mp2";
+- else if (stream->codec == CODEC_ID_AAC)
++ else if (stream->codec == AV_CODEC_ID_AAC)
+ strName = "aac";
+- else if (stream->codec == CODEC_ID_DTS)
++ else if (stream->codec == AV_CODEC_ID_DTS)
+ strName = "dca";
+- else if (stream->codec == CODEC_ID_MPEG2VIDEO)
++ else if (stream->codec == AV_CODEC_ID_MPEG2VIDEO)
+ strName = "mpeg2video";
+- else if (stream->codec == CODEC_ID_H264)
++ else if (stream->codec == AV_CODEC_ID_H264)
+ strName = "h264";
+- else if (stream->codec == CODEC_ID_EAC3)
++ else if (stream->codec == AV_CODEC_ID_EAC3)
+ strName = "eac3";
+ }
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp 2013-08-03 15:17:39.182291301 +1100
+@@ -86,12 +86,12 @@
+ stricmp(strMimeType.c_str(), CONTENT_TYPE_AACPLUS) == 0)
+ {
+ // need an aac decoder first
+- m_pDemuxStream->codec = CODEC_ID_AAC;
++ m_pDemuxStream->codec = AV_CODEC_ID_AAC;
+ }
+ else // (stricmp(strMimeType, CONTENT_TYPE_MP3) == 0)
+ {
+ // default to mp3
+- m_pDemuxStream->codec = CODEC_ID_MP3;
++ m_pDemuxStream->codec = AV_CODEC_ID_MP3;
+ }
+
+ return true;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp 2013-08-03 15:17:39.182291301 +1100
+@@ -71,7 +71,7 @@
+
+ CDVDStreamInfo hints;
+ CDVDCodecOptions options;
+- hints.codec = CODEC_ID_DVD_SUBTITLE;
++ hints.codec = AV_CODEC_ID_DVD_SUBTITLE;
+
+ char line[2048];
+ DECLARE_UNUSED(bool,res)
+@@ -211,7 +211,7 @@
+ else
+ stream->iPhysicalId = -1;
+
+- stream->codec = CODEC_ID_DVD_SUBTITLE;
++ stream->codec = AV_CODEC_ID_DVD_SUBTITLE;
+ stream->iId = m_Streams.size();
+
+ state.id = stream->iId;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDFileInfo.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2013-08-03 15:17:39.182291301 +1100
+@@ -162,7 +162,7 @@
+ CDVDStreamInfo hint(*pDemuxer->GetStream(nVideoStream), true);
+ hint.software = true;
+
+- if (hint.codec == CODEC_ID_MPEG2VIDEO || hint.codec == CODEC_ID_MPEG1VIDEO)
++ if (hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_MPEG1VIDEO)
+ {
+ // libmpeg2 is not thread safe so use ffmepg for mpeg2/mpeg1 thumb extraction
+ CDVDCodecOptions dvdOptions;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerAudio.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerAudio.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerAudio.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerAudio.h 2013-08-03 15:37:53.655526419 +1100
+@@ -38,7 +38,7 @@
+ class IAudioCallback;
+ class CDVDAudioCodec;
+
+-enum CodecID;
++enum AVCodecID;
+
+ #define DECODE_FLAG_DROP 1
+ #define DECODE_FLAG_RESYNC 2
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp 2013-08-03 15:17:39.183291318 +1100
+@@ -86,7 +86,7 @@
+ }
+ }
+ }
+- else if (m_streaminfo.codec == CODEC_ID_DVD_SUBTITLE)
++ else if (m_streaminfo.codec == AV_CODEC_ID_DVD_SUBTITLE)
+ {
+ CDVDOverlaySpu* pSPUInfo = m_dvdspus.AddData(pPacket->pData, pPacket->iSize, pPacket->pts);
+ if (pSPUInfo)
+@@ -171,7 +171,7 @@
+ }
+
+ // dvd's use special subtitle decoder
+- if(hints.codec == CODEC_ID_DVD_SUBTITLE && filename == "dvd")
++ if(hints.codec == AV_CODEC_ID_DVD_SUBTITLE && filename == "dvd")
+ return true;
+
+ m_pOverlayCodec = CDVDFactoryCodec::CreateOverlayCodec(hints);
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp 2013-08-03 15:20:16.168885372 +1100
+@@ -114,7 +114,7 @@
+ bool CDVDTeletextData::CheckStream(CDVDStreamInfo &hints)
+ {
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,38,1)
+- if (hints.codec == CODEC_ID_DVB_TELETEXT)
++ if (hints.codec == AV_CODEC_ID_DVB_TELETEXT)
+ return true;
+ #endif
+
+@@ -126,7 +126,7 @@
+ m_messageQueue.Init();
+
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,38,1)
+- if (hints.codec == CODEC_ID_DVB_TELETEXT)
++ if (hints.codec == AV_CODEC_ID_DVB_TELETEXT)
+ {
+ CLog::Log(LOGNOTICE, "Creating teletext data thread");
+ Create();
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerVideo.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerVideo.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerVideo.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerVideo.h 2013-08-03 15:17:39.184291335 +1100
+@@ -31,7 +31,6 @@
+ #include "cores/VideoRenderers/RenderManager.h"
+ #endif
+
+-enum CodecID;
+ class CDemuxStreamVideo;
+ class CDVDOverlayCodecCC;
+
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-08-03 15:17:39.184291335 +1100
+@@ -38,7 +38,7 @@
+
+ void CDVDStreamInfo::Clear()
+ {
+- codec = CODEC_ID_NONE;
++ codec = AV_CODEC_ID_NONE;
+ type = STREAM_NONE;
+ software = false;
+ codec_tag = 0;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-08-03 15:17:39.184291335 +1100
+@@ -59,7 +59,7 @@
+ void Assign(const CDVDStreamInfo &right, bool withextradata);
+ void Assign(const CDemuxStream &right, bool withextradata);
+
+- CodecID codec;
++ AVCodecID codec;
+ StreamType type;
+ bool software; //force software decoding
+
+diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.cpp xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.cpp
+--- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.cpp 2013-08-03 15:17:39.185291351 +1100
+@@ -1225,17 +1225,17 @@
+ }
+ }
+
+-bool COMXAudio::CanHWDecode(CodecID codec)
++bool COMXAudio::CanHWDecode(AVCodecID codec)
+ {
+ bool ret = false;
+ switch(codec)
+ {
+- case CODEC_ID_DTS:
++ case AV_CODEC_ID_DTS:
+ CLog::Log(LOGDEBUG, "COMXAudio::CanHWDecode OMX_AUDIO_CodingDTS\n");
+ ret = true;
+ break;
+- case CODEC_ID_AC3:
+- case CODEC_ID_EAC3:
++ case AV_CODEC_ID_AC3:
++ case AV_CODEC_ID_EAC3:
+ CLog::Log(LOGDEBUG, "COMXAudio::CanHWDecode OMX_AUDIO_CodingDDP\n");
+ ret = true;
+ break;
+diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.h xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.h
+--- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.h 2013-08-03 15:17:39.185291351 +1100
+@@ -85,7 +85,7 @@
+ void Process();
+
+ void SetCodingType(AEDataFormat dataFormat);
+- static bool CanHWDecode(CodecID codec);
++ static bool CanHWDecode(AVCodecID codec);
+
+ void PrintChannels(OMX_AUDIO_CHANNELTYPE eChannelMapping[]);
+ void PrintPCM(OMX_AUDIO_PARAM_PCMMODETYPE *pcm, std::string direction);
+diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXPlayerAudio.cpp xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXPlayerAudio.cpp
+--- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-08-03 15:19:42.317320020 +1100
+@@ -305,8 +305,8 @@
+ m_hints.samplerate = m_pAudioCodec->GetSampleRate();
+ }
+
+- /* only check bitrate changes on CODEC_ID_DTS, CODEC_ID_AC3, CODEC_ID_EAC3 */
+- if(m_hints.codec != CODEC_ID_DTS && m_hints.codec != CODEC_ID_AC3 && m_hints.codec != CODEC_ID_EAC3)
++ /* only check bitrate changes on AV_CODEC_ID_DTS, AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 */
++ if(m_hints.codec != AV_CODEC_ID_DTS && m_hints.codec != AV_CODEC_ID_AC3 && m_hints.codec != AV_CODEC_ID_EAC3)
+ new_bitrate = old_bitrate = 0;
+
+ if(m_hints_current.codec != m_hints.codec ||
+@@ -667,12 +667,12 @@
+ /* pathrought is overriding hw decode*/
+ if(AUDIO_IS_BITSTREAM(g_guiSettings.GetInt("audiooutput.mode")) && m_use_passthrough)
+ {
+- if(hints.codec == CODEC_ID_AC3 && g_guiSettings.GetBool("audiooutput.ac3passthrough") && hdmi_passthrough_ac3)
++ if(hints.codec == AV_CODEC_ID_AC3 && g_guiSettings.GetBool("audiooutput.ac3passthrough") && hdmi_passthrough_ac3)
+ {
+ dataFormat = AE_FMT_AC3;
+ m_passthrough = true;
+ }
+- if(hints.codec == CODEC_ID_DTS && g_guiSettings.GetBool("audiooutput.dtspassthrough") && hdmi_passthrough_dts)
++ if(hints.codec == AV_CODEC_ID_DTS && g_guiSettings.GetBool("audiooutput.dtspassthrough") && hdmi_passthrough_dts)
+ {
+ dataFormat = AE_FMT_DTS;
+ m_passthrough = true;
+@@ -682,12 +682,12 @@
+ /* hw decode */
+ if(m_use_hw_decode && !m_passthrough)
+ {
+- if(hints.codec == CODEC_ID_AC3 && COMXAudio::CanHWDecode(m_hints.codec))
++ if(hints.codec == AV_CODEC_ID_AC3 && COMXAudio::CanHWDecode(m_hints.codec))
+ {
+ dataFormat = AE_FMT_AC3;
+ m_hw_decode = true;
+ }
+- if(hints.codec == CODEC_ID_DTS && COMXAudio::CanHWDecode(m_hints.codec))
++ if(hints.codec == AV_CODEC_ID_DTS && COMXAudio::CanHWDecode(m_hints.codec))
+ {
+ dataFormat = AE_FMT_DTS;
+ m_hw_decode = true;
+diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.cpp xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.cpp
+--- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.cpp 2013-08-03 15:17:39.186291368 +1100
+@@ -131,11 +131,11 @@
+ return true;
+ }
+
+-bool COMXVideo::NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata, int in_extrasize)
++bool COMXVideo::NaluFormatStartCodes(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize)
+ {
+ switch(codec)
+ {
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ if (in_extrasize < 7 || in_extradata == NULL)
+ return true;
+ // valid avcC atom data always starts with the value 1 (version), otherwise annexb
+@@ -178,7 +178,7 @@
+
+ switch (hints.codec)
+ {
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ {
+ switch(hints.profile)
+ {
+@@ -234,64 +234,64 @@
+ }
+ }
+ break;
+- case CODEC_ID_MPEG4:
++ case AV_CODEC_ID_MPEG4:
+ // (role name) video_decoder.mpeg4
+ // MPEG-4, DivX 4/5 and Xvid compatible
+ decoder_name = OMX_MPEG4_DECODER;
+ m_codingType = OMX_VIDEO_CodingMPEG4;
+ m_video_codec_name = "omx-mpeg4";
+ break;
+- case CODEC_ID_MPEG1VIDEO:
+- case CODEC_ID_MPEG2VIDEO:
++ case AV_CODEC_ID_MPEG1VIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO:
+ // (role name) video_decoder.mpeg2
+ // MPEG-2
+ decoder_name = OMX_MPEG2V_DECODER;
+ m_codingType = OMX_VIDEO_CodingMPEG2;
+ m_video_codec_name = "omx-mpeg2";
+ break;
+- case CODEC_ID_H263:
++ case AV_CODEC_ID_H263:
+ // (role name) video_decoder.mpeg4
+ // MPEG-4, DivX 4/5 and Xvid compatible
+ decoder_name = OMX_MPEG4_DECODER;
+ m_codingType = OMX_VIDEO_CodingMPEG4;
+ m_video_codec_name = "omx-h263";
+ break;
+- case CODEC_ID_VP6:
++ case AV_CODEC_ID_VP6:
+ // this form is encoded upside down
+ vflip = true;
+ // fall through
+- case CODEC_ID_VP6F:
+- case CODEC_ID_VP6A:
++ case AV_CODEC_ID_VP6F:
++ case AV_CODEC_ID_VP6A:
+ // (role name) video_decoder.vp6
+ // VP6
+ decoder_name = OMX_VP6_DECODER;
+ m_codingType = OMX_VIDEO_CodingVP6;
+ m_video_codec_name = "omx-vp6";
+ break;
+- case CODEC_ID_VP8:
++ case AV_CODEC_ID_VP8:
+ // (role name) video_decoder.vp8
+ // VP8
+ decoder_name = OMX_VP8_DECODER;
+ m_codingType = OMX_VIDEO_CodingVP8;
+ m_video_codec_name = "omx-vp8";
+ break;
+- case CODEC_ID_THEORA:
++ case AV_CODEC_ID_THEORA:
+ // (role name) video_decoder.theora
+ // theora
+ decoder_name = OMX_THEORA_DECODER;
+ m_codingType = OMX_VIDEO_CodingTheora;
+ m_video_codec_name = "omx-theora";
+ break;
+- case CODEC_ID_MJPEG:
+- case CODEC_ID_MJPEGB:
++ case AV_CODEC_ID_MJPEG:
++ case AV_CODEC_ID_MJPEGB:
+ // (role name) video_decoder.mjpg
+ // mjpg
+ decoder_name = OMX_MJPEG_DECODER;
+ m_codingType = OMX_VIDEO_CodingMJPEG;
+ m_video_codec_name = "omx-mjpeg";
+ break;
+- case CODEC_ID_VC1:
+- case CODEC_ID_WMV3:
++ case AV_CODEC_ID_VC1:
++ case AV_CODEC_ID_WMV3:
+ // (role name) video_decoder.vc1
+ // VC-1, WMV9
+ decoder_name = OMX_VC1_DECODER;
+diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.h xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.h
+--- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.h 2013-08-03 15:18:46.130381924 +1100
+@@ -98,7 +98,7 @@
+ ResolutionUpdateCallBackFn m_res_callback;
+ void *m_res_ctx;
+ bool m_submitted_eos;
+- bool NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata, int in_extrasize);
++ bool NaluFormatStartCodes(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize);
+ };
+
+ #endif
+diff -urN xbmc-12.2-orig/xbmc/utils/BitstreamConverter.cpp xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.cpp
+--- xbmc-12.2-orig/xbmc/utils/BitstreamConverter.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.cpp 2013-08-03 15:25:54.780538147 +1100
+@@ -431,7 +431,7 @@
+ Close();
+ }
+
+-bool CBitstreamConverter::Open(enum CodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb)
++bool CBitstreamConverter::Open(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb)
+ {
+ m_to_annexb = to_annexb;
+
+@@ -439,7 +439,7 @@
+
+ switch(codec)
+ {
+- case CODEC_ID_H264:
++ case AV_CODEC_ID_H264:
+ if (in_extrasize < 7 || in_extradata == NULL)
+ {
+ CLog::Log(LOGERROR, "CBitstreamConverter::Open avcC data too small or missing\n");
+@@ -587,7 +587,7 @@
+
+ if (pData)
+ {
+- if(m_codec == CODEC_ID_H264)
++ if(m_codec == AV_CODEC_ID_H264)
+ {
+ if(m_to_annexb)
+ {
+diff -urN xbmc-12.2-orig/xbmc/utils/BitstreamConverter.h xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.h
+--- xbmc-12.2-orig/xbmc/utils/BitstreamConverter.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.h 2013-08-03 15:17:39.188291400 +1100
+@@ -114,7 +114,7 @@
+ static void skip_bits( bits_reader_t *br, int nbits );
+ static uint32_t get_bits( bits_reader_t *br, int nbits );
+
+- bool Open(enum CodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb);
++ bool Open(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb);
+ void Close(void);
+ bool NeedConvert(void) { return m_convert_bitstream; };
+ bool Convert(uint8_t *pData, int iSize);
+@@ -163,7 +163,7 @@
+ bool m_convert_bytestream;
+ DllAvUtil *m_dllAvUtil;
+ DllAvFormat *m_dllAvFormat;
+- CodecID m_codec;
++ AVCodecID m_codec;
+ };
+
+ #endif
+diff -urN xbmc-12.2-orig/lib/DllAvFilter.h xbmc-12.2-bufferframe/lib/DllAvFilter.h
+--- xbmc-12.2-orig/lib/DllAvFilter.h 2013-05-03 16:57:40.000000000 +1100
++++ xbmc-12.2-bufferframe/lib/DllAvFilter.h 2013-08-03 15:57:21.000000000 +1100
+@@ -46,6 +46,7 @@
+ #include <libavfilter/avfiltergraph.h>
+ #include <libavfilter/buffersink.h>
+ #include <libavfilter/avcodec.h>
++ #include <libavfilter/buffersrc.h>
+ #elif (defined HAVE_FFMPEG_AVFILTER_H)
+ #include <ffmpeg/avfiltergraph.h>
+ #include <ffmpeg/buffersink.h>
+@@ -55,9 +56,17 @@
+ #include "libavfilter/avfiltergraph.h"
+ #include "libavfilter/buffersink.h"
+ #include "libavfilter/avcodec.h"
++ #include <libavfilter/buffersrc.h>
+ #endif
+ }
+
++#if LIBAVFILTER_VERSION_MICRO >= 100
++ #define LIBAVFILTER_FROM_FFMPEG
++#else
++ #define LIBAVFILTER_FROM_LIBAV
++#endif
++
++
+ #include "threads/SingleLock.h"
+
+ class DllAvFilterInterface
+@@ -74,10 +83,13 @@
+ virtual void avfilter_inout_free(AVFilterInOut **inout)=0;
+ virtual int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs, void *log_ctx)=0;
+ virtual int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)=0;
+-#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
+- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
+-#else
++#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
++ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
++ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame)=0;
++#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
+ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
++#else
++ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
+ #endif
+ virtual void avfilter_unref_buffer(AVFilterBufferRef *ref)=0;
+ virtual int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)=0;
+@@ -134,10 +146,13 @@
+ {
+ return ::avfilter_graph_config(graphctx, log_ctx);
+ }
+-#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
+- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
+-#else
++#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
++ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
++ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame) { return ::av_buffersrc_add_frame(buffer_filter, frame); }
++#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
+ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame, int flags) { return ::av_buffersrc_add_frame(buffer_filter, frame, flags); }
++#else
++ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
+ #endif
+ virtual void avfilter_unref_buffer(AVFilterBufferRef *ref) { ::avfilter_unref_buffer(ref); }
+ virtual int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad) { return ::avfilter_link(src, srcpad, dst, dstpad); }
+@@ -172,10 +187,13 @@
+ DEFINE_METHOD1(void, avfilter_inout_free_dont_call, (AVFilterInOut **p1))
+ DEFINE_FUNC_ALIGNED5(int, __cdecl, avfilter_graph_parse_dont_call, AVFilterGraph *, const char *, AVFilterInOut **, AVFilterInOut **, void *)
+ DEFINE_FUNC_ALIGNED2(int, __cdecl, avfilter_graph_config_dont_call, AVFilterGraph *, void *)
+-#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
+- DEFINE_METHOD3(int, av_vsrc_buffer_add_frame, (AVFilterContext *p1, AVFrame *p2, int p3))
+-#else
++#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
++ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
++ DEFINE_METHOD2(int, av_buffersrc_add_frame, (AVFilterContext *p1, AVFrame *p2))
++#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
+ DEFINE_METHOD3(int, av_buffersrc_add_frame, (AVFilterContext *p1, AVFrame *p2, int p3))
++#else
++ DEFINE_METHOD3(int, av_vsrc_buffer_add_frame, (AVFilterContext *p1, AVFrame *p2, int p3))
+ #endif
+ DEFINE_METHOD1(void, avfilter_unref_buffer, (AVFilterBufferRef *p1))
+ DEFINE_METHOD4(int, avfilter_link, (AVFilterContext *p1, unsigned p2, AVFilterContext *p3, unsigned p4))
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-12.2-bufferframe/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-bufferframe/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-08-03 15:55:20.699922079 +1100
+@@ -796,18 +796,25 @@
+
+ if (frame)
+ {
+-#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
+- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
+-#else
++#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
++ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
++ // API changed in:
++ // ffmpeg: commit 7e350379f87e7f74420b4813170fe808e2313911 (28 Nov 2012)
++ // not released (post 1.2)
++ // libav: commit 7e350379f87e7f74420b4813170fe808e2313911 (28 Nov 2012)
++ // release v9 (5 January 2013)
++ result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame);
++#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
++ // API changed in:
++ // ffmpeg: commit 7bac2a78c2241df4bcc1665703bb71afd9a3e692 (28 Apr 2012)
++ // release 0.11 (25 May 2012)
+ result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame, 0);
++#else
++ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
+ #endif
+ if (result < 0)
+ {
+-#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
+- CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_vsrc_buffer_add_frame");
+-#else
+- CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_buffersrc_add_frame");
+-#endif
++ CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_buffersrc_add_frame/av_vsrc_buffer_add_frame");
+ return VC_ERROR;
+ }
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-12.2-dsp_mask/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-dsp_mask/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-08-03 16:51:34.431714287 +1100
+@@ -272,9 +272,6 @@
+ memcpy(m_pCodecContext->extradata, hints.extradata, hints.extrasize);
+ }
+
+- // set acceleration
+- m_pCodecContext->dsp_mask = 0;//FF_MM_FORCE | FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE;
+-
+ // advanced setting override for skip loop filter (see avcodec.h for valid options)
+ // TODO: allow per video setting?
+ if (g_advancedSettings.m_iSkipLoopFilter != 0)
+diff -urN xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.h xbmc-12.2-framesize/xbmc/cdrip/EncoderFFmpeg.h
+--- xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-framesize/xbmc/cdrip/EncoderFFmpeg.h 2013-08-03 16:25:51.108586271 +1100
+@@ -45,7 +45,7 @@
+ AVCodecContext *m_CodecCtx;
+ AVStream *m_Stream;
+ AVPacket m_Pkt;
+- unsigned char m_BCBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
++ unsigned char m_BCBuffer[192000];
+ static int MuxerReadPacket(void *opaque, uint8_t *buf, int buf_size);
+ void SetTag(const CStdString tag, const CStdString value);
+
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp 2013-08-03 16:26:54.049609066 +1100
+@@ -30,8 +30,8 @@
+ {
+ m_iBufferSize1 = 0;
+ m_iBufferSize2 = 0;
+- m_pBuffer2 = (BYTE*)_aligned_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE, 16);
+- memset(m_pBuffer2, 0, AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
++ m_pBuffer2 = (BYTE*)_aligned_malloc(192000 + FF_INPUT_BUFFER_PADDING_SIZE, 16);
++ memset(m_pBuffer2, 0, 192000 + FF_INPUT_BUFFER_PADDING_SIZE);
+
+ m_iBuffered = 0;
+ m_pCodecContext = NULL;
+@@ -145,7 +145,7 @@
+ int iBytesUsed, got_frame;
+ if (!m_pCodecContext) return -1;
+
+- m_iBufferSize1 = AVCODEC_MAX_AUDIO_FRAME_SIZE ;
++ m_iBufferSize1 = 192000 ;
+ m_iBufferSize2 = 0;
+
+ AVPacket avpkt;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-08-03 16:27:14.603943109 +1100
+@@ -24,7 +24,7 @@
+ #include "DVDCodecs/DVDCodecs.h"
+ #include "DVDAudioCodecPcm.h"
+
+-#define LPCM_BUFFER_SIZE (AVCODEC_MAX_AUDIO_FRAME_SIZE / 2)
++#define LPCM_BUFFER_SIZE (192000 / 2)
+
+ class CDVDAudioCodecLPcm : public CDVDAudioCodecPcm
+ {
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-08-03 16:27:33.671253002 +1100
+@@ -66,7 +66,7 @@
+ std::list<DataPacket*> m_OutputBuffer;
+ unsigned int m_OutputSize;
+ bool m_WroteHeader;
+- unsigned char m_BCBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
++ unsigned char m_BCBuffer[192000];
+ unsigned int m_Consumed;
+ unsigned int m_BufferSize;
+ uint8_t *m_Buffer;
+@@ -89,7 +89,7 @@
+ unsigned int m_DecodeSize;
+ bool SupportsFormat(CDVDStreamInfo &hints);
+
+- uint8_t m_NeededBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
++ uint8_t m_NeededBuffer[192000];
+ unsigned int m_NeededUsed;
+ unsigned int m_Needed;
+ bool m_LostSync;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-08-03 16:27:23.996095755 +1100
+@@ -172,8 +172,8 @@
+ src = pData;
+ int buf_size = iSize;
+
+- if (iSize > AVCODEC_MAX_AUDIO_FRAME_SIZE / 2)
+- iSize = AVCODEC_MAX_AUDIO_FRAME_SIZE / 2;
++ if (iSize > 192000 / 2)
++ iSize = 192000 / 2;
+
+ switch (m_codecID)
+ {
+diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp xbmc-12.2-framesize/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp
+--- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-framesize/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp 2013-08-03 16:27:42.952403863 +1100
+@@ -26,7 +26,7 @@
+
+ #include "cores/AudioEngine/Utils/AEUtil.h"
+
+-#define MAX_AUDIO_FRAME_SIZE (AVCODEC_MAX_AUDIO_FRAME_SIZE*2)
++#define MAX_AUDIO_FRAME_SIZE (192000*2)
+
+ template <class AudioDataType>
+ static inline void _Upmix(AudioDataType *input,
+@@ -178,7 +178,7 @@
+ int iBytesUsed, got_frame;
+ if (!m_pCodecContext) return -1;
+
+- m_iBufferSize1 = AVCODEC_MAX_AUDIO_FRAME_SIZE;
++ m_iBufferSize1 = 192000;
+ m_iBufferSize2 = 0;
+
+ AVPacket avpkt;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-08-03 16:41:47.751742559 +1100
+@@ -60,7 +60,6 @@
+ m_pCodecContext->debug_mv = 0;
+ m_pCodecContext->debug = 0;
+ m_pCodecContext->workaround_bugs = FF_BUG_AUTODETECT;
+- m_pCodecContext->sub_id = hints.identifier;
+ m_pCodecContext->codec_tag = hints.codec_tag;
+ m_pCodecContext->time_base.num = 1;
+ m_pCodecContext->time_base.den = DVD_TIME_BASE;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-08-03 16:41:47.752742576 +1100
+@@ -1043,7 +1043,6 @@
+ {
+ CDemuxStreamSubtitleFFmpeg* st = new CDemuxStreamSubtitleFFmpeg(this, pStream);
+ m_streams[iId] = st;
+- st->identifier = pStream->codec->sub_id;
+
+ if(m_dllAvUtil.av_dict_get(pStream->metadata, "title", NULL, 0))
+ st->m_description = m_dllAvUtil.av_dict_get(pStream->metadata, "title", NULL, 0)->value;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-08-03 16:41:47.752742576 +1100
+@@ -207,11 +207,8 @@
+ public:
+ CDemuxStreamSubtitle() : CDemuxStream()
+ {
+- identifier = 0;
+ type = STREAM_SUBTITLE;
+ }
+-
+- int identifier;
+ };
+
+ class CDemuxStreamTeletext : public CDemuxStream
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-08-03 16:41:47.753742593 +1100
+@@ -316,7 +316,13 @@
+ uint32_t composition_id = 0, ancillary_id = 0;
+ htsmsg_get_u32(sub, "composition_id", &composition_id);
+ htsmsg_get_u32(sub, "ancillary_id" , &ancillary_id);
+- st.s->identifier = (composition_id & 0xffff) | ((ancillary_id & 0xffff) << 16);
++ if(composition_id || ancillary_id)
++ {
++ st.s->ExtraData = new uint8_t[4];
++ st.s->ExtraSize = 4;
++ ((uint16_t*)st.s->ExtraData)[0] = composition_id;
++ ((uint16_t*)st.s->ExtraData)[1] = ancillary_id;
++ }
+ } else if(!strcmp(type, "TEXTSUB")) {
+ st.s = new CDemuxStreamSubtitle();
+ st.s->codec = AV_CODEC_ID_TEXT;
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-08-03 16:41:47.753742593 +1100
+@@ -418,7 +418,13 @@
+ {
+ st = new CDemuxStreamSubtitlePVRClient(this);
+ }
+- st->identifier = props.stream[i].iIdentifier;
++ if(props.stream[i].iIdentifier)
++ {
++ st->ExtraData = new uint8_t[4];
++ st->ExtraSize = 4;
++ ((uint16_t*)st->ExtraData)[0] = (props.stream[i].iIdentifier >> 0) & 0xFFFFu;
++ ((uint16_t*)st->ExtraData)[1] = (props.stream[i].iIdentifier >> 4) & 0xFFFFu;
++ }
+ m_streams[i] = st;
+ }
+ else
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.cpp
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-08-03 16:41:47.753742593 +1100
+@@ -67,7 +67,6 @@
+ bitrate = 0;
+ bitspersample = 0;
+
+- identifier = 0;
+ orientation = 0;
+ }
+
+@@ -108,7 +107,6 @@
+ || bitspersample != right.bitspersample ) return false;
+
+ // SUBTITLE
+- if( identifier != right.identifier ) return false;
+
+ return true;
+ }
+@@ -164,7 +162,6 @@
+ bitspersample = right.bitspersample;
+
+ // SUBTITLE
+- identifier = right.identifier;
+ }
+
+ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)
+@@ -209,7 +206,5 @@
+ }
+ else if( right.type == STREAM_SUBTITLE )
+ {
+- const CDemuxStreamSubtitle *stream = static_cast<const CDemuxStreamSubtitle*>(&right);
+- identifier = stream->identifier;
+ }
+ }
+diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.h
+--- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-05-03 16:57:41.000000000 +1100
++++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-08-03 16:41:47.753742593 +1100
+@@ -87,7 +87,6 @@
+ int bitspersample;
+
+ // SUBTITLE
+- int identifier;
+
+ // CODEC EXTRADATA
+ void* extradata; // extra data for codec to use
diff --git a/multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch b/multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch
new file mode 100644
index 0000000000000..35d4d6db4fd76
--- /dev/null
+++ b/multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch
@@ -0,0 +1,14 @@
+diff -Naur xbmc-pvr-addons-12.0-Frodo.orig/addons/pvr.hts/src/client.h xbmc-pvr-addons-12.0-Frodo/addons/pvr.hts/src/client.h
+--- xbmc-pvr-addons-12.0-Frodo.orig/addons/pvr.hts/src/client.h 2013-01-19 01:40:32.000000000 +0000
++++ xbmc-pvr-addons-12.0-Frodo/addons/pvr.hts/src/client.h 2013-11-12 01:35:15.818543473 +0000
+@@ -26,6 +26,10 @@
+ #include "libXBMC_gui.h"
+ #include "avcodec.h"
+
++#if !defined (CodecID)
++#define CodecID AVCodecID
++#endif
++
+ #define DEFAULT_HOST "127.0.0.1"
+ #define DEFAULT_HTTP_PORT 9981
+ #define DEFAULT_HTSP_PORT 9982
diff --git a/multimedia/xbmc/xbmc.SlackBuild b/multimedia/xbmc/xbmc.SlackBuild
index 27c808be3aeb3..9c0445219b6e9 100644
--- a/multimedia/xbmc/xbmc.SlackBuild
+++ b/multimedia/xbmc/xbmc.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=xbmc
VERSION=${VERSION:-12.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -62,7 +62,6 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-tar xvf $CWD/taglib-1.8.tar.gz
tar xvf $CWD/$PRGNAM-pvr-addons-12.0-Frodo.tar.gz || tar xvf $CWD/12.0-Frodo.tar.gz
chown -R root:root .
find . \
@@ -84,6 +83,9 @@ sed -i 's|^#ifdef GIT_REV|#ifndef GIT_REV|' $PRGNAM/GUIInfoManager.cpp
# http://slaxbmc.blogspot.com/2011/03/23-install-xbmc-from-source.html
patch -p1 < $CWD/patches/xbmc-rtmpdump-build.patch
+# Patch for Samba 4.0.
+patch -p1 < $CWD/patches/samba-4.0.patch
+
# Hack for using afpfs-ng.
cat lib/afpfs-ng/fix_afpfs-ng_includes.patch | head -1336 | tail -1172 | patch -p1
AFPFS_NGFLAGS="-I$PWD/include"
@@ -92,6 +94,9 @@ AFPFS_NGFLAGS="-I$PWD/include"
if [ "${FFMPEG:-no}" == "yes" ]; then
OPT_DEPS="--enable-external-ffmpeg"
OPT_DEPS_ADDONS="--enable-external-ffmpeg"
+ # Patches for newer ffmpeg > 2.0.
+ patch -p1 < $CWD/patches/xbmc-12.2-ffmpeg-2.0.patch
+ patch -p0 < $CWD/patches/xbmc-pvr-addons-ffmpeg-2.0.patch
else
OPT_DEPS="--disable-external-ffmpeg"
OPT_DEPS_ADDONS="--disable-external-ffmpeg"
@@ -109,23 +114,6 @@ if [ "${PULSE:-no}" == "yes" ]; then
OPT_DEPS="$OPT_DEPS --enable-pulse"
fi
-# XBMC requires taglib >= 1.8. Slackware 14.0 comes with taglib 1.7.2.
-# We are going to build a static version of taglib for XBMC.
-cd taglib-1.8
- cmake -G "Unix Makefiles" \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DENABLE_STATIC=ON \
- -DLIB_SUFFIX="${LIBDIRSUFFIX}" \
- -DWITH_MP4=ON \
- -DWITH_ASF=ON \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release .
-
- make VERBOSE=1
- make install DESTDIR=$PWD
-cd ..
-
# Build the pvr addons.
cd $PRGNAM-pvr-addons-12.0-Frodo
./bootstrap
@@ -143,9 +131,6 @@ cd $PRGNAM-pvr-addons-12.0-Frodo
make
cd ..
-TAGLIB_CFLAGS="-I$PWD/taglib-1.8/usr/include" \
-TAGLIB_LIBS="-L$PWD/taglib-1.8/usr/lib${LIBDIRSUFFIX} -ltag" \
-LDFLAGS="-L$PWD/taglib-1.8/usr/lib${LIBDIRSUFFIX} -ltag" \
CFLAGS="$SLKCFLAGS $AFPFS_NGFLAGS" \
CXXFLAGS="$SLKCFLAGS $AFPFS_NGFLAGS" \
./configure \
@@ -169,10 +154,6 @@ make
# Wii controller usage. Default is no.
if ! [ "${WII:-no}" = "no" ]; then
- # SBO comes with latest release version of CWIID, which is 5 years old.
- # Two options have been deactivated because they are not available in
- # release version of cwiid.
- patch -p1 < $CWD/patches/cwiid-old-api.patch
make eventclients DESTDIR=$PKG WII_EXTRA_OPTS="-DCWIID_OLD"
find $PKG/usr/lib${LIBDIRSUFFIX}/python* -iname "*\.py" -exec chmod 0644 '{}' \;
fi
diff --git a/multimedia/xbmc/xbmc.info b/multimedia/xbmc/xbmc.info
index 68c42a607f2ea..92198acabf7d4 100644
--- a/multimedia/xbmc/xbmc.info
+++ b/multimedia/xbmc/xbmc.info
@@ -2,11 +2,9 @@ PRGNAM="xbmc"
VERSION="12.2"
HOMEPAGE="http://xbmc.org/"
DOWNLOAD="http://mirrors.xbmc.org/releases/source/xbmc-12.2.tar.gz \
- https://github.com/opdenkamp/xbmc-pvr-addons/archive/12.0-Frodo.tar.gz \
- http://github.com/downloads/taglib/taglib/taglib-1.8.tar.gz"
+ https://github.com/opdenkamp/xbmc-pvr-addons/archive/12.0-Frodo.tar.gz"
MD5SUM="489f3877decae4e265ece54f9eaef0ba \
- 4a1020b1a890e26505da7cc9afef1cea \
- dcb8bd1b756f2843e18b1fdf3aaeee15"
+ 4a1020b1a890e26505da7cc9afef1cea"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="%README% jdk libass libmpeg2 libmodplug yajl tinyxml"