aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelupus <elupus@xbmc.org>2011-06-22 22:11:05 +0200
committerelupus <elupus@xbmc.org>2011-06-22 22:11:05 +0200
commitfba5b106659c9aa0e0f0eaac6f7f5f8c8e3a6229 (patch)
tree7fda9343d0ab7bd173e9835d8812b9c269f0f3f9
parent76bc55296bcea50e022eedda7ab475292e192bfa (diff)
changed: attempt to support some more recent libavfilter for the src filter
-rw-r--r--lib/DllAvFilter.h6
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp10
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
index 29f8ed6db8..2a6a0a8d6a 100644
--- a/lib/DllAvFilter.h
+++ b/lib/DllAvFilter.h
@@ -148,7 +148,13 @@ class DllAvFilter : public DllDynamic, DllAvFilterInterface
DEFINE_FUNC_ALIGNED1(int, __cdecl, avfilter_poll_frame, AVFilterLink *)
DEFINE_FUNC_ALIGNED1(int, __cdecl, avfilter_request_frame, AVFilterLink*)
#endif
+#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+ DEFINE_METHOD4(int, av_vsrc_buffer_add_frame, (AVFilterContext *p1, AVFrame *p2))
+#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
+ DEFINE_METHOD4(int, av_vsrc_buffer_add_frame, (AVFilterContext *p1, AVFrame *p2, int64_t p3))
+#else
DEFINE_METHOD4(int, av_vsrc_buffer_add_frame, (AVFilterContext *p1, AVFrame *p2, int64_t p3, AVRational p4))
+#endif
DEFINE_METHOD4(AVFilterBufferRef*, avfilter_get_video_buffer, (AVFilterLink *p1, int p2, int p3, int p4))
DEFINE_METHOD1(void, avfilter_unref_buffer, (AVFilterBufferRef *p1))
DEFINE_METHOD4(int, avfilter_link, (AVFilterContext *p1, unsigned p2, AVFilterContext *p3, unsigned p4))
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index f9cb972263..f5cb98290c 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -782,7 +782,15 @@ int CDVDVideoCodecFFmpeg::FilterProcess(AVFrame* frame)
if (frame)
{
- if ((result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio)) < 0)
+#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame);
+#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts);
+#else
+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
+#endif
+
+ if (result < 0)
{
CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_vsrc_buffer_add_frame");
return VC_ERROR;