summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/mplayer/files/mplayer-1.1-libav-9.patch')
-rw-r--r--media-video/mplayer/files/mplayer-1.1-libav-9.patch488
1 files changed, 488 insertions, 0 deletions
diff --git a/media-video/mplayer/files/mplayer-1.1-libav-9.patch b/media-video/mplayer/files/mplayer-1.1-libav-9.patch
new file mode 100644
index 000000000000..a2630b61bbcf
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.1-libav-9.patch
@@ -0,0 +1,488 @@
+diff -urN MPlayer-1.1.orig//av_opts.c MPlayer-1.1/av_opts.c
+--- MPlayer-1.1.orig//av_opts.c 2012-01-28 14:51:57.000000000 +0100
++++ MPlayer-1.1/av_opts.c 2013-01-17 09:29:34.472213703 +0100
+@@ -42,7 +42,7 @@
+ arg = strchr(str, '=');
+ if(arg) *arg++= 0;
+
+- if(av_set_string3(v, str, arg, 0, NULL) < 0){
++ if(av_opt_set(v, str, arg, 0) < 0){
+ free(start);
+ return -1;
+ }
+diff -urN MPlayer-1.1.orig//bstr.c MPlayer-1.1/bstr.c
+--- MPlayer-1.1.orig//bstr.c 2010-07-19 00:00:48.000000000 +0200
++++ MPlayer-1.1/bstr.c 2013-01-17 09:43:10.787183988 +0100
+@@ -18,6 +18,7 @@
+
+ #include <string.h>
+ #include <libavutil/avutil.h>
++#include <libavutil/common.h>
+
+ #include "bstr.h"
+
+diff -urN MPlayer-1.1.orig//codec-cfg.c MPlayer-1.1/codec-cfg.c
+--- MPlayer-1.1.orig//codec-cfg.c 2012-05-08 12:56:22.000000000 +0200
++++ MPlayer-1.1/codec-cfg.c 2013-01-17 09:34:39.860202586 +0100
+@@ -54,6 +54,7 @@
+ #include "help_mp.h"
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "libmpcodecs/img_format.h"
+ #include "codec-cfg.h"
+
+diff -urN MPlayer-1.1.orig//fmt-conversion.c MPlayer-1.1/fmt-conversion.c
+--- MPlayer-1.1.orig//fmt-conversion.c 2013-01-17 09:16:03.213243232 +0100
++++ MPlayer-1.1/fmt-conversion.c 2013-01-17 09:28:32.490215959 +0100
+@@ -26,134 +26,134 @@
+
+ static const struct {
+ int fmt;
+- enum PixelFormat pix_fmt;
++ enum AVPixelFormat pix_fmt;
+ } conversion_map[] = {
+- {IMGFMT_ARGB, PIX_FMT_ARGB},
+- {IMGFMT_BGRA, PIX_FMT_BGRA},
+- {IMGFMT_BGR24, PIX_FMT_BGR24},
+- {IMGFMT_BGR16BE, PIX_FMT_RGB565BE},
+- {IMGFMT_BGR16LE, PIX_FMT_RGB565LE},
+- {IMGFMT_BGR15BE, PIX_FMT_RGB555BE},
+- {IMGFMT_BGR15LE, PIX_FMT_RGB555LE},
+- {IMGFMT_BGR12BE, PIX_FMT_RGB444BE},
+- {IMGFMT_BGR12LE, PIX_FMT_RGB444LE},
+- {IMGFMT_BGR8, PIX_FMT_RGB8},
+- {IMGFMT_BGR4, PIX_FMT_RGB4},
+- {IMGFMT_BGR1, PIX_FMT_MONOBLACK},
+- {IMGFMT_RGB1, PIX_FMT_MONOBLACK},
+- {IMGFMT_RG4B, PIX_FMT_BGR4_BYTE},
+- {IMGFMT_BG4B, PIX_FMT_RGB4_BYTE},
+- {IMGFMT_RGB48LE, PIX_FMT_RGB48LE},
+- {IMGFMT_RGB48BE, PIX_FMT_RGB48BE},
+- {IMGFMT_ABGR, PIX_FMT_ABGR},
+- {IMGFMT_RGBA, PIX_FMT_RGBA},
+- {IMGFMT_RGB24, PIX_FMT_RGB24},
+- {IMGFMT_RGB16BE, PIX_FMT_BGR565BE},
+- {IMGFMT_RGB16LE, PIX_FMT_BGR565LE},
+- {IMGFMT_RGB15BE, PIX_FMT_BGR555BE},
+- {IMGFMT_RGB15LE, PIX_FMT_BGR555LE},
+- {IMGFMT_RGB12BE, PIX_FMT_BGR444BE},
+- {IMGFMT_RGB12LE, PIX_FMT_BGR444LE},
+- {IMGFMT_RGB8, PIX_FMT_BGR8},
+- {IMGFMT_RGB4, PIX_FMT_BGR4},
+- {IMGFMT_BGR8, PIX_FMT_PAL8},
+-// NB: This works only because PIX_FMT_0RGB32 is a CPP Macro.
+-// note that most other PIX_FMT values are enums
+-#ifdef PIX_FMT_0RGB32
+- {IMGFMT_BGR32, PIX_FMT_0RGB32},
+- {IMGFMT_BGRA, PIX_FMT_BGR0},
+- {IMGFMT_RGBA, PIX_FMT_RGB0},
+- {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
+- {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
++ {IMGFMT_ARGB, AV_PIX_FMT_ARGB},
++ {IMGFMT_BGRA, AV_PIX_FMT_BGRA},
++ {IMGFMT_BGR24, AV_PIX_FMT_BGR24},
++ {IMGFMT_BGR16BE, AV_PIX_FMT_RGB565BE},
++ {IMGFMT_BGR16LE, AV_PIX_FMT_RGB565LE},
++ {IMGFMT_BGR15BE, AV_PIX_FMT_RGB555BE},
++ {IMGFMT_BGR15LE, AV_PIX_FMT_RGB555LE},
++ {IMGFMT_BGR12BE, AV_PIX_FMT_RGB444BE},
++ {IMGFMT_BGR12LE, AV_PIX_FMT_RGB444LE},
++ {IMGFMT_BGR8, AV_PIX_FMT_RGB8},
++ {IMGFMT_BGR4, AV_PIX_FMT_RGB4},
++ {IMGFMT_BGR1, AV_PIX_FMT_MONOBLACK},
++ {IMGFMT_RGB1, AV_PIX_FMT_MONOBLACK},
++ {IMGFMT_RG4B, AV_PIX_FMT_BGR4_BYTE},
++ {IMGFMT_BG4B, AV_PIX_FMT_RGB4_BYTE},
++ {IMGFMT_RGB48LE, AV_PIX_FMT_RGB48LE},
++ {IMGFMT_RGB48BE, AV_PIX_FMT_RGB48BE},
++ {IMGFMT_ABGR, AV_PIX_FMT_ABGR},
++ {IMGFMT_RGBA, AV_PIX_FMT_RGBA},
++ {IMGFMT_RGB24, AV_PIX_FMT_RGB24},
++ {IMGFMT_RGB16BE, AV_PIX_FMT_BGR565BE},
++ {IMGFMT_RGB16LE, AV_PIX_FMT_BGR565LE},
++ {IMGFMT_RGB15BE, AV_PIX_FMT_BGR555BE},
++ {IMGFMT_RGB15LE, AV_PIX_FMT_BGR555LE},
++ {IMGFMT_RGB12BE, AV_PIX_FMT_BGR444BE},
++ {IMGFMT_RGB12LE, AV_PIX_FMT_BGR444LE},
++ {IMGFMT_RGB8, AV_PIX_FMT_BGR8},
++ {IMGFMT_RGB4, AV_PIX_FMT_BGR4},
++ {IMGFMT_BGR8, AV_PIX_FMT_PAL8},
++// NB: This works only because AV_PIX_FMT_0RGB32 is a CPP Macro.
++// note that most other AV_PIX_FMT values are enums
++#ifdef AV_PIX_FMT_0RGB32
++ {IMGFMT_BGR32, AV_PIX_FMT_0RGB32},
++ {IMGFMT_BGRA, AV_PIX_FMT_BGR0},
++ {IMGFMT_RGBA, AV_PIX_FMT_RGB0},
++ {IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE},
++ {IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE},
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 50, 0)
+- {IMGFMT_422A, PIX_FMT_YUVA422P},
++ {IMGFMT_422A, AV_PIX_FMT_YUVA422P},
+ #endif
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101)
+- {IMGFMT_444A, PIX_FMT_YUVA444P},
++ {IMGFMT_444A, AV_PIX_FMT_YUVA444P},
+ #endif
+ #endif
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
+- {IMGFMT_GBR24P, PIX_FMT_GBRP},
++ {IMGFMT_GBR24P, AV_PIX_FMT_GBRP},
+ #endif
+- {IMGFMT_YUY2, PIX_FMT_YUYV422},
+- {IMGFMT_UYVY, PIX_FMT_UYVY422},
+- {IMGFMT_NV12, PIX_FMT_NV12},
+- {IMGFMT_NV21, PIX_FMT_NV21},
+- {IMGFMT_Y800, PIX_FMT_GRAY8},
+- {IMGFMT_Y8, PIX_FMT_GRAY8},
+- {IMGFMT_YVU9, PIX_FMT_YUV410P},
+- {IMGFMT_IF09, PIX_FMT_YUV410P},
+- {IMGFMT_YV12, PIX_FMT_YUV420P},
+- {IMGFMT_I420, PIX_FMT_YUV420P},
+- {IMGFMT_IYUV, PIX_FMT_YUV420P},
+- {IMGFMT_411P, PIX_FMT_YUV411P},
+- {IMGFMT_422P, PIX_FMT_YUV422P},
+- {IMGFMT_444P, PIX_FMT_YUV444P},
+- {IMGFMT_440P, PIX_FMT_YUV440P},
+-
+- {IMGFMT_420A, PIX_FMT_YUVA420P},
+-
+- {IMGFMT_420P16_LE, PIX_FMT_YUV420P16LE},
+- {IMGFMT_420P16_BE, PIX_FMT_YUV420P16BE},
+- {IMGFMT_420P10_LE, PIX_FMT_YUV420P10LE},
+- {IMGFMT_420P10_BE, PIX_FMT_YUV420P10BE},
+- {IMGFMT_420P9_LE, PIX_FMT_YUV420P9LE},
+- {IMGFMT_420P9_BE, PIX_FMT_YUV420P9BE},
+- {IMGFMT_422P16_LE, PIX_FMT_YUV422P16LE},
+- {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE},
+- {IMGFMT_422P10_LE, PIX_FMT_YUV422P10LE},
+- {IMGFMT_422P10_BE, PIX_FMT_YUV422P10BE},
+- {IMGFMT_422P9_LE, PIX_FMT_YUV422P9LE},
+- {IMGFMT_422P9_BE, PIX_FMT_YUV422P9BE},
+- {IMGFMT_444P16_LE, PIX_FMT_YUV444P16LE},
+- {IMGFMT_444P16_BE, PIX_FMT_YUV444P16BE},
+- {IMGFMT_444P10_LE, PIX_FMT_YUV444P10LE},
+- {IMGFMT_444P10_BE, PIX_FMT_YUV444P10BE},
+- {IMGFMT_444P9_LE, PIX_FMT_YUV444P9LE},
+- {IMGFMT_444P9_BE, PIX_FMT_YUV444P9BE},
++ {IMGFMT_YUY2, AV_PIX_FMT_YUYV422},
++ {IMGFMT_UYVY, AV_PIX_FMT_UYVY422},
++ {IMGFMT_NV12, AV_PIX_FMT_NV12},
++ {IMGFMT_NV21, AV_PIX_FMT_NV21},
++ {IMGFMT_Y800, AV_PIX_FMT_GRAY8},
++ {IMGFMT_Y8, AV_PIX_FMT_GRAY8},
++ {IMGFMT_YVU9, AV_PIX_FMT_YUV410P},
++ {IMGFMT_IF09, AV_PIX_FMT_YUV410P},
++ {IMGFMT_YV12, AV_PIX_FMT_YUV420P},
++ {IMGFMT_I420, AV_PIX_FMT_YUV420P},
++ {IMGFMT_IYUV, AV_PIX_FMT_YUV420P},
++ {IMGFMT_411P, AV_PIX_FMT_YUV411P},
++ {IMGFMT_422P, AV_PIX_FMT_YUV422P},
++ {IMGFMT_444P, AV_PIX_FMT_YUV444P},
++ {IMGFMT_440P, AV_PIX_FMT_YUV440P},
++
++ {IMGFMT_420A, AV_PIX_FMT_YUVA420P},
++
++ {IMGFMT_420P16_LE, AV_PIX_FMT_YUV420P16LE},
++ {IMGFMT_420P16_BE, AV_PIX_FMT_YUV420P16BE},
++ {IMGFMT_420P10_LE, AV_PIX_FMT_YUV420P10LE},
++ {IMGFMT_420P10_BE, AV_PIX_FMT_YUV420P10BE},
++ {IMGFMT_420P9_LE, AV_PIX_FMT_YUV420P9LE},
++ {IMGFMT_420P9_BE, AV_PIX_FMT_YUV420P9BE},
++ {IMGFMT_422P16_LE, AV_PIX_FMT_YUV422P16LE},
++ {IMGFMT_422P16_BE, AV_PIX_FMT_YUV422P16BE},
++ {IMGFMT_422P10_LE, AV_PIX_FMT_YUV422P10LE},
++ {IMGFMT_422P10_BE, AV_PIX_FMT_YUV422P10BE},
++ {IMGFMT_422P9_LE, AV_PIX_FMT_YUV422P9LE},
++ {IMGFMT_422P9_BE, AV_PIX_FMT_YUV422P9BE},
++ {IMGFMT_444P16_LE, AV_PIX_FMT_YUV444P16LE},
++ {IMGFMT_444P16_BE, AV_PIX_FMT_YUV444P16BE},
++ {IMGFMT_444P10_LE, AV_PIX_FMT_YUV444P10LE},
++ {IMGFMT_444P10_BE, AV_PIX_FMT_YUV444P10BE},
++ {IMGFMT_444P9_LE, AV_PIX_FMT_YUV444P9LE},
++ {IMGFMT_444P9_BE, AV_PIX_FMT_YUV444P9BE},
+
+ // YUVJ are YUV formats that use the full Y range and not just
+ // 16 - 235 (see colorspaces.txt).
+ // Currently they are all treated the same way.
+- {IMGFMT_YV12, PIX_FMT_YUVJ420P},
+- {IMGFMT_422P, PIX_FMT_YUVJ422P},
+- {IMGFMT_444P, PIX_FMT_YUVJ444P},
+- {IMGFMT_440P, PIX_FMT_YUVJ440P},
+-
+- {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC},
+- {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT},
+- {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1},
+- {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2},
+- {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264},
+- {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3},
+- {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1},
+- {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4},
+- {0, PIX_FMT_NONE}
++ {IMGFMT_YV12, AV_PIX_FMT_YUVJ420P},
++ {IMGFMT_422P, AV_PIX_FMT_YUVJ422P},
++ {IMGFMT_444P, AV_PIX_FMT_YUVJ444P},
++ {IMGFMT_440P, AV_PIX_FMT_YUVJ440P},
++
++ {IMGFMT_XVMC_MOCO_MPEG2, AV_PIX_FMT_XVMC_MPEG2_MC},
++ {IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC_MPEG2_IDCT},
++ {IMGFMT_VDPAU_MPEG1, AV_PIX_FMT_VDPAU_MPEG1},
++ {IMGFMT_VDPAU_MPEG2, AV_PIX_FMT_VDPAU_MPEG2},
++ {IMGFMT_VDPAU_H264, AV_PIX_FMT_VDPAU_H264},
++ {IMGFMT_VDPAU_WMV3, AV_PIX_FMT_VDPAU_WMV3},
++ {IMGFMT_VDPAU_VC1, AV_PIX_FMT_VDPAU_VC1},
++ {IMGFMT_VDPAU_MPEG4, AV_PIX_FMT_VDPAU_MPEG4},
++ {0, AV_PIX_FMT_NONE}
+ };
+
+-enum PixelFormat imgfmt2pixfmt(int fmt)
++enum AVPixelFormat imgfmt2pixfmt(int fmt)
+ {
+ int i;
+- enum PixelFormat pix_fmt;
++ enum AVPixelFormat pix_fmt;
+ for (i = 0; conversion_map[i].fmt; i++)
+ if (conversion_map[i].fmt == fmt)
+ break;
+ pix_fmt = conversion_map[i].pix_fmt;
+- if (pix_fmt == PIX_FMT_NONE)
++ if (pix_fmt == AV_PIX_FMT_NONE)
+ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported format %s\n", vo_format_name(fmt));
+ return pix_fmt;
+ }
+
+-int pixfmt2imgfmt(enum PixelFormat pix_fmt)
++int pixfmt2imgfmt(enum AVPixelFormat pix_fmt)
+ {
+ int i;
+ int fmt;
+- for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++)
++ for (i = 0; conversion_map[i].pix_fmt != AV_PIX_FMT_NONE; i++)
+ if (conversion_map[i].pix_fmt == pix_fmt)
+ break;
+ fmt = conversion_map[i].fmt;
+ if (!fmt)
+- mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported PixelFormat %i\n", pix_fmt);
++ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported AVPixelFormat %i\n", pix_fmt);
+ return fmt;
+ }
+
+diff -urN MPlayer-1.1.orig//fmt-conversion.h MPlayer-1.1/fmt-conversion.h
+--- MPlayer-1.1.orig//fmt-conversion.h 2011-03-01 22:44:15.000000000 +0100
++++ MPlayer-1.1/fmt-conversion.h 2013-01-17 09:28:38.120215759 +0100
+@@ -23,8 +23,8 @@
+ #include "libavutil/avutil.h"
+ #include "libavutil/samplefmt.h"
+
+-enum PixelFormat imgfmt2pixfmt(int fmt);
+-int pixfmt2imgfmt(enum PixelFormat pix_fmt);
++enum AVPixelFormat imgfmt2pixfmt(int fmt);
++int pixfmt2imgfmt(enum AVPixelFormat pix_fmt);
+ enum AVSampleFormat affmt2samplefmt(int fmt);
+ int samplefmt2affmt(enum AVSampleFormat sample_fmt);
+
+diff -urN MPlayer-1.1.orig//libaf/af_format.c MPlayer-1.1/libaf/af_format.c
+--- MPlayer-1.1.orig//libaf/af_format.c 2011-10-26 17:12:35.000000000 +0200
++++ MPlayer-1.1/libaf/af_format.c 2013-01-17 09:43:32.770183189 +0100
+@@ -34,6 +34,7 @@
+ #include "libvo/fastmemcpy.h"
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+
+ /* Functions used by play to convert the input audio to the correct
+ format */
+diff -urN MPlayer-1.1.orig//libaf/af_lavcac3enc.c MPlayer-1.1/libaf/af_lavcac3enc.c
+--- MPlayer-1.1.orig//libaf/af_lavcac3enc.c 2012-02-19 16:21:23.000000000 +0100
++++ MPlayer-1.1/libaf/af_lavcac3enc.c 2013-01-17 09:44:27.103181211 +0100
+@@ -32,6 +32,7 @@
+ #include "reorder_ch.h"
+ #include "av_helpers.h"
+
++#include "libavutil/common.h"
+ #include "libavcodec/avcodec.h"
+ #include "libavutil/intreadwrite.h"
+
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf.c MPlayer-1.1/libmpcodecs/vf.c
+--- MPlayer-1.1.orig//libmpcodecs/vf.c 2012-05-30 23:08:05.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf.c 2013-01-17 09:50:25.861168154 +0100
+@@ -40,6 +40,7 @@
+ #include "vf.h"
+
+ #include "libvo/fastmemcpy.h"
++#include "libavutil/common.h"
+ #include "libavutil/mem.h"
+
+ extern const vf_info_t vf_info_1bpp;
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_geq.c MPlayer-1.1/libmpcodecs/vf_geq.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_geq.c 2011-04-19 09:32:36.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf_geq.c 2013-01-17 09:44:01.045182161 +0100
+@@ -34,6 +34,8 @@
+
+ #include "libavcodec/avcodec.h"
+ #include "libavutil/eval.h"
++#include "libavutil/common.h"
++#include "libavutil/mem.h"
+
+ struct vf_priv_s {
+ AVExpr * e[3];
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c MPlayer-1.1/libmpcodecs/vf_gradfun.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c 2010-04-06 11:46:47.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf_gradfun.c 2013-01-17 09:47:10.679175257 +0100
+@@ -39,6 +39,7 @@
+ #include "vf.h"
+ #include "libvo/fastmemcpy.h"
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "libavutil/x86_cpu.h"
+
+ struct vf_priv_s {
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_sab.c MPlayer-1.1/libmpcodecs/vf_sab.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_sab.c 2011-05-25 15:46:32.000000000 +0200
++++ MPlayer-1.1/libmpcodecs/vf_sab.c 2013-01-17 09:28:59.964214957 +0100
+@@ -32,6 +32,7 @@
+ #endif
+
+ #include "libavutil/avutil.h"
++#include "libavutil/mem.h"
+ #include "img_format.h"
+ #include "mp_image.h"
+ #include "vf.h"
+diff -urN MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c MPlayer-1.1/libmpcodecs/vf_screenshot.c
+--- MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c 2012-02-19 23:09:30.000000000 +0100
++++ MPlayer-1.1/libmpcodecs/vf_screenshot.c 2013-01-17 09:28:04.643216971 +0100
+@@ -39,6 +39,7 @@
+
+ #include "libswscale/swscale.h"
+ #include "libavcodec/avcodec.h"
++#include "libavutil/mem.h"
+
+ struct vf_priv_s {
+ int frameno;
+diff -urN MPlayer-1.1.orig//libmpdemux/demux_lavf.c MPlayer-1.1/libmpdemux/demux_lavf.c
+--- MPlayer-1.1.orig//libmpdemux/demux_lavf.c 2012-04-07 22:08:53.000000000 +0200
++++ MPlayer-1.1/libmpdemux/demux_lavf.c 2013-01-17 09:41:44.880187116 +0100
+@@ -317,20 +317,20 @@
+ sh_audio->samplerate= codec->sample_rate;
+ sh_audio->i_bps= codec->bit_rate/8;
+ switch (codec->codec_id) {
+- case CODEC_ID_PCM_S8:
+- case CODEC_ID_PCM_U8:
++ case AV_CODEC_ID_PCM_S8:
++ case AV_CODEC_ID_PCM_U8:
+ sh_audio->samplesize = 1;
+ break;
+- case CODEC_ID_PCM_S16LE:
+- case CODEC_ID_PCM_S16BE:
+- case CODEC_ID_PCM_U16LE:
+- case CODEC_ID_PCM_U16BE:
++ case AV_CODEC_ID_PCM_S16LE:
++ case AV_CODEC_ID_PCM_S16BE:
++ case AV_CODEC_ID_PCM_U16LE:
++ case AV_CODEC_ID_PCM_U16BE:
+ sh_audio->samplesize = 2;
+ break;
+- case CODEC_ID_PCM_ALAW:
++ case AV_CODEC_ID_PCM_ALAW:
+ sh_audio->format = 0x6;
+ break;
+- case CODEC_ID_PCM_MULAW:
++ case AV_CODEC_ID_PCM_MULAW:
+ sh_audio->format = 0x7;
+ break;
+ }
+@@ -358,7 +358,7 @@
+ priv->vstreams[priv->video_streams] = i;
+ bih=calloc(sizeof(*bih) + codec->extradata_size,1);
+
+- if(codec->codec_id == CODEC_ID_RAWVIDEO) {
++ if(codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
+ switch (codec->pix_fmt) {
+ case PIX_FMT_RGB24:
+ codec->codec_tag= MKTAG(24, 'B', 'G', 'R');
+@@ -423,24 +423,24 @@
+ case AVMEDIA_TYPE_SUBTITLE:{
+ sh_sub_t* sh_sub;
+ char type;
+- if(codec->codec_id == CODEC_ID_TEXT)
++ if(codec->codec_id == AV_CODEC_ID_TEXT)
+ type = 't';
+- else if(codec->codec_id == CODEC_ID_MOV_TEXT)
++ else if(codec->codec_id == AV_CODEC_ID_MOV_TEXT)
+ type = 'm';
+- else if(codec->codec_id == CODEC_ID_SSA)
++ else if(codec->codec_id == AV_CODEC_ID_SSA)
+ type = 'a';
+- else if(codec->codec_id == CODEC_ID_DVD_SUBTITLE)
++ else if(codec->codec_id == AV_CODEC_ID_DVD_SUBTITLE)
+ type = 'v';
+- else if(codec->codec_id == CODEC_ID_XSUB)
++ else if(codec->codec_id == AV_CODEC_ID_XSUB)
+ type = 'x';
+- else if(codec->codec_id == CODEC_ID_DVB_SUBTITLE)
++ else if(codec->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
+ type = 'b';
+- else if(codec->codec_id == CODEC_ID_DVB_TELETEXT)
++ else if(codec->codec_id == AV_CODEC_ID_DVB_TELETEXT)
+ type = 'd';
+- else if(codec->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE)
++ else if(codec->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE)
+ type = 'p';
+-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
+- else if(codec->codec_id == CODEC_ID_EIA_608)
++#if LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
++ else if(codec->codec_id == AV_CODEC_ID_EIA_608)
+ type = 'c';
+ #endif
+ else if(codec->codec_tag == MKTAG('c', '6', '0', '8'))
+@@ -465,7 +465,7 @@
+ break;
+ }
+ case AVMEDIA_TYPE_ATTACHMENT:{
+- if (st->codec->codec_id == CODEC_ID_TTF) {
++ if (st->codec->codec_id == AV_CODEC_ID_TTF) {
+ AVDictionaryEntry *fnametag = av_dict_get(st->metadata, "filename", NULL, 0);
+ demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL,
+ "application/x-truetype-font",
+@@ -808,7 +808,7 @@
+ prog->aid = program->stream_index[i];
+ break;
+ case AVMEDIA_TYPE_SUBTITLE:
+- if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == CODEC_ID_TEXT)
++ if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == AV_CODEC_ID_TEXT)
+ prog->sid = program->stream_index[i];
+ break;
+ }
+diff -urN MPlayer-1.1.orig//stream/cache2.c MPlayer-1.1/stream/cache2.c
+--- MPlayer-1.1.orig//stream/cache2.c 2012-03-04 16:11:50.000000000 +0100
++++ MPlayer-1.1/stream/cache2.c 2013-01-17 09:30:01.501212718 +0100
+@@ -40,6 +40,7 @@
+ #include <errno.h>
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "osdep/shmem.h"
+ #include "osdep/timer.h"
+ #if defined(__MINGW32__)
+diff -urN MPlayer-1.1.orig//sub/spudec.c MPlayer-1.1/sub/spudec.c
+--- MPlayer-1.1.orig//sub/spudec.c 2012-04-23 20:39:16.000000000 +0200
++++ MPlayer-1.1/sub/spudec.c 2013-01-17 09:46:50.054176009 +0100
+@@ -42,6 +42,7 @@
+ #include "spudec.h"
+ #include "vobsub.h"
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+ #include "libavutil/intreadwrite.h"
+ #include "libswscale/swscale.h"
+
+diff -urN MPlayer-1.1.orig//sub/sub_cc.c MPlayer-1.1/sub/sub_cc.c
+--- MPlayer-1.1.orig//sub/sub_cc.c 2012-04-07 22:08:53.000000000 +0200
++++ MPlayer-1.1/sub/sub_cc.c 2013-01-17 09:46:31.413176687 +0100
+@@ -42,6 +42,7 @@
+ #include "sub.h"
+
+ #include "libavutil/avutil.h"
++#include "libavutil/common.h"
+
+
+ #define CC_MAX_LINE_LENGTH 64