diff -urN xbmc-11.0.old/lib/DllAvFilter.h xbmc-11.0/lib/DllAvFilter.h --- xbmc-11.0.old/lib/DllAvFilter.h 2012-11-14 18:24:21.122362534 +0100 +++ xbmc-11.0/lib/DllAvFilter.h 2012-11-14 18:45:21.249334727 +0100 @@ -26,7 +26,9 @@ #include "DynamicDll.h" #include "DllAvCodec.h" #include "DllAvFormat.h" +#if LIBAVFILTER_VERSION_MICRO >= 50 // not Libav #include "DllSwResample.h" +#endif #include "utils/log.h" extern "C" { @@ -45,7 +47,11 @@ #if (defined HAVE_LIBAVFILTER_AVFILTER_H) #include #include - #include + #if LIBAVFILTER_VERSION_MICRO < 50 // Libav + #include + #else + #include + #endif #elif (defined HAVE_FFMPEG_AVFILTER_H) #include #include @@ -75,7 +81,11 @@ 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) +#if LIBAVFILTER_VERSION_MICRO < 50 // Libav + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0; +#else virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0; +#endif #else virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0; #endif @@ -135,7 +145,11 @@ return ::avfilter_graph_config(graphctx, log_ctx); } #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0) +#if LIBAVFILTER_VERSION_MICRO < 50 // Libav + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, pts, pixel_aspect); } +#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 #else virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame, int flags) { return ::av_buffersrc_add_frame(buffer_filter, frame, flags); } #endif @@ -207,7 +221,9 @@ /* dependencies of libavfilter */ DllAvUtil m_dllAvUtil; +#if LIBAVFILTER_VERSION_MICRO >= 50 // not Libav DllSwResample m_dllSwResample; +#endif DllAvFormat m_dllAvFormat; public: @@ -255,8 +271,10 @@ { if (!m_dllAvUtil.Load()) return false; +#if LIBAVFILTER_VERSION_MICRO >= 50 // not Libav if (!m_dllSwResample.Load()) return false; +#endif if (!m_dllAvFormat.Load()) return false; return DllDynamic::Load(); diff -urN xbmc-11.0.old/lib/DllAvUtil.h xbmc-11.0/lib/DllAvUtil.h --- xbmc-11.0.old/lib/DllAvUtil.h 2012-11-14 18:24:21.122362534 +0100 +++ xbmc-11.0/lib/DllAvUtil.h 2012-11-14 18:24:53.788361813 +0100 @@ -38,6 +38,8 @@ #include #include #include + // for channel_layout + #include // for LIBAVCODEC_VERSION_INT: #include #elif (defined HAVE_FFMPEG_AVUTIL_H) diff -urN xbmc-11.0.old/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp --- xbmc-11.0.old/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2012-11-14 18:24:21.421362528 +0100 +++ xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2012-11-14 18:24:53.788361813 +0100 @@ -833,7 +833,11 @@ if (frame) { #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0) +#if LIBAVFILTER_VERSION_MICRO < 50 // Libav + result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio); +#else result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0); +#endif #else result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame, 0); #endif