aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2018-04-12 18:48:41 +0200
committerGravatar Jan Ekström <jeebjp@gmail.com>2018-04-15 23:11:33 +0300
commit67b36c66d399b52e3a6d3a2ededeefabd31312c4 (patch)
tree6b619f7cf42eb13d009d79567cca88ca27d112e7
parent4e7cbb760603074ee5d7b81500b7d52883bd9e24 (diff)
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.
-rw-r--r--filters/f_autoconvert.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/filters/f_autoconvert.c b/filters/f_autoconvert.c
index 78b716623e..6d53a5dce3 100644
--- a/filters/f_autoconvert.c
+++ b/filters/f_autoconvert.c
@@ -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) ||