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.)
This commit is contained in:
wm4 2016-07-24 19:19:24 +02:00
parent 3623cec7d2
commit 6bb48a10db
1 changed files with 5 additions and 2 deletions

View File

@ -1023,8 +1023,11 @@ static double find_best_speed(struct MPContext *mpctx, double vsync)
static bool using_spdif_passthrough(struct MPContext *mpctx) static bool using_spdif_passthrough(struct MPContext *mpctx)
{ {
if (mpctx->ao_chain) if (mpctx->ao_chain && mpctx->ao_chain->ao) {
return !af_fmt_is_pcm(mpctx->ao_chain->input_format.format); 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; return false;
} }