summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-24 08:11:42 +0100
committerwm4 <wm4@nowhere>2017-01-24 08:11:42 +0100
commitb14fac9afa79e44d8b0323c6ddbef1557cdd0d8d (patch)
tree676e8e9ef45690491d827b553ec8cc29f49e84f3 /audio/decode/ad_lavc.c
parent6be58df8d14922bc1f4252f9f69ca9c0d74c331a (diff)
downloadmpv-b14fac9afa79e44d8b0323c6ddbef1557cdd0d8d.tar.bz2
mpv-b14fac9afa79e44d8b0323c6ddbef1557cdd0d8d.tar.xz
build: replace some FFmpeg API checks with version checks
The FFmpeg versions we support all have the APIs we were checking for. Only Libav missed them. Simplify this by explicitly checking for FFmpeg in the code, instead of trying to detect the presence of the API.
Diffstat (limited to 'audio/decode/ad_lavc.c')
-rw-r--r--audio/decode/ad_lavc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index 759f4879f0..820559a06b 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -115,7 +115,7 @@ static int init(struct dec_audio *da, const char *decoder)
av_opt_set_double(lavc_context, "drc_scale", opts->ac3drc,
AV_OPT_SEARCH_CHILDREN);
-#if HAVE_AVFRAME_SKIP_SAMPLES
+#if LIBAVCODEC_VERSION_MICRO >= 100
// Let decoder add AV_FRAME_DATA_SKIP_SAMPLES.
av_opt_set(lavc_context, "flags2", "+skip_manual", AV_OPT_SEARCH_CHILDREN);
#endif
@@ -251,7 +251,7 @@ static bool receive_frame(struct dec_audio *da, struct mp_audio **out)
if (mpframe->pts != MP_NOPTS_VALUE)
priv->next_pts = mpframe->pts + mpframe->samples / (double)mpframe->rate;
-#if HAVE_AVFRAME_SKIP_SAMPLES
+#if LIBAVCODEC_VERSION_MICRO >= 100
AVFrameSideData *sd =
av_frame_get_side_data(priv->avframe, AV_FRAME_DATA_SKIP_SAMPLES);
if (sd && sd->size >= 10) {