aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Mejia <mcitadel@gmail.com>2011-07-17 09:55:33 -0400
committerAndres Mejia <mcitadel@gmail.com>2011-07-17 09:58:05 -0400
commit573b4bc18b85b28d74f02345014582ababb2bf1a (patch)
tree967c03866347af5557f5369a04357e3302db565e
parent84082ccdc633843b58525204ad24b7c9afd4b8a3 (diff)
Fix check for use of sample_aspect_ratio.
Renaming of this member are not from the same libavfilter version in libav and ffmpeg.
-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;