summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-24 19:19:24 +0200
committerwm4 <wm4@nowhere>2016-07-24 19:19:24 +0200
commit6bb48a10dba13a7bd119bea7522f6810c9c27870 (patch)
tree6c5ab2c6dbe1c41724c77aaaaf8a64e5b42f50f4 /player/video.c
parent3623cec7d2753ec7e7bf1ca73580203acb3347c8 (diff)
downloadmpv-6bb48a10dba13a7bd119bea7522f6810c9c27870.tar.bz2
mpv-6bb48a10dba13a7bd119bea7522f6810c9c27870.tar.xz
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.)
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c7
1 files changed, 5 insertions, 2 deletions
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;
}