mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 15:22:09 +00:00
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.
This commit is contained in:
parent
d1bdf9ea11
commit
f679c5de1b
@ -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_set_double(lavc_context, "drc_scale", opts->ac3drc,
|
||||||
AV_OPT_SEARCH_CHILDREN);
|
AV_OPT_SEARCH_CHILDREN);
|
||||||
|
|
||||||
|
#if HAVE_AVFRAME_SKIP_SAMPLES
|
||||||
// Let decoder add AV_FRAME_DATA_SKIP_SAMPLES.
|
// Let decoder add AV_FRAME_DATA_SKIP_SAMPLES.
|
||||||
av_opt_set(lavc_context, "flags2", "+skip_manual", AV_OPT_SEARCH_CHILDREN);
|
av_opt_set(lavc_context, "flags2", "+skip_manual", AV_OPT_SEARCH_CHILDREN);
|
||||||
|
#endif
|
||||||
|
|
||||||
mp_set_avopts(da->log, lavc_context, opts->avopts);
|
mp_set_avopts(da->log, lavc_context, opts->avopts);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user