summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-04 12:30:14 +0200
committerwm4 <wm4@nowhere>2014-10-04 12:30:34 +0200
commitf679c5de1bc27ac87179b6ef3869319aeba5e3f4 (patch)
tree502f34d95de336ee0522e026a93e439b5c369045
parentd1bdf9ea1195c5f81906631ab789cb741a96968c (diff)
downloadmpv-f679c5de1bc27ac87179b6ef3869319aeba5e3f4.tar.bz2
mpv-f679c5de1bc27ac87179b6ef3869319aeba5e3f4.tar.xz
ad_lavc: avoid warning messages on older FFmpeg or Libav
If the flag doesn't exist, the av_opt_set() API will print warning messages.
-rw-r--r--audio/decode/ad_lavc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index b138c5d69c..16a4ae45d0 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -156,8 +156,10 @@ 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
// Let decoder add AV_FRAME_DATA_SKIP_SAMPLES.
av_opt_set(lavc_context, "flags2", "+skip_manual", AV_OPT_SEARCH_CHILDREN);
+#endif
mp_set_avopts(da->log, lavc_context, opts->avopts);