From 6bb48a10dba13a7bd119bea7522f6810c9c27870 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 24 Jul 2016 19:19:24 +0200 Subject: player: disable DS with spdif transcoding too Otherwise it behaves dumb. (Although you could argue it shouldn't try to guess whether speed changes work, but instead simply disable DS if they don't work.) --- player/video.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 0f324b3e6c..e3295b623a 100644 --- a/player/video.c +++ b/player/video.c @@ -1023,8 +1023,11 @@ static double find_best_speed(struct MPContext *mpctx, double vsync) static bool using_spdif_passthrough(struct MPContext *mpctx) { - if (mpctx->ao_chain) - return !af_fmt_is_pcm(mpctx->ao_chain->input_format.format); + if (mpctx->ao_chain && mpctx->ao_chain->ao) { + struct mp_audio out_format = {0}; + ao_get_format(mpctx->ao_chain->ao, &out_format); + return !af_fmt_is_pcm(out_format.format); + } return false; } -- cgit v1.2.3