audio: do not try to resample spdif data

Normally we don't even try this, but in corner cases it can happen. For
example when inserting lavcac3enc at runtime, and display-sync-resample
was active.
This commit is contained in:
wm4 2018-04-12 18:48:41 +02:00 committed by Jan Ekström
parent 4e7cbb7606
commit 67b36c66d3
1 changed files with 5 additions and 0 deletions

View File

@ -286,6 +286,11 @@ static void handle_audio_frame(struct mp_filter *f)
struct mp_chmap chmap = {0};
mp_aframe_get_chmap(aframe, &chmap);
if (p->resampling_forced && !af_fmt_is_pcm(afmt)) {
MP_WARN(p, "ignoring request to resample non-PCM audio for speed change\n");
p->resampling_forced = false;
}
bool format_change = afmt != p->in_afmt ||
srate != p->in_srate ||
!mp_chmap_equals(&chmap, &p->in_chmap) ||