aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in14
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp2
2 files changed, 15 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 6788e18106..129b2c1a82 100644
--- a/configure.in
+++ b/configure.in
@@ -883,6 +883,20 @@ if test "$use_external_ffmpeg" = "yes"; then
AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
+ # Check if AVFilterBufferRefVideoProps AVRational member is named
+ # 'pixel_aspect' or 'sample_aspect_ratio'.
+ AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
+ [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
+ [1],
+ [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
+ [AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
+ [AC_DEFINE([HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO],
+ [1],
+ [Define to 1 if AVFilterBufferRefVideoProps has member sample_aspect_ratio.])],
+ ,
+ [[#include <ffmpeg/avfilter.h>]])],
+ [[#include <libavfilter/avfilter.h>]])
+
AC_MSG_NOTICE($external_ffmpeg_enabled)
USE_EXTERNAL_FFMPEG=1
AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index e1a2f6a93a..4f2a7cefcd 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -570,7 +570,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture* pDvdVideoPicture)
/* use variable in the frame */
AVRational pixel_aspect = m_pCodecContext->sample_aspect_ratio;
if (m_pFilterLink)
-#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,4,0)
+#ifdef HAVE_AVFILTERBUFFERREFVIDEOPROPS_SAMPLE_ASPECT_RATIO
pixel_aspect = m_pFilterLink->cur_buf->video->sample_aspect_ratio;
#else
pixel_aspect = m_pFilterLink->cur_buf->video->pixel_aspect;