From bf60281ffb6f47986fa6ef9ee559689be0075050 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 10 Nov 2013 23:15:02 +0100 Subject: audio/out: reject non-interleaved formats No AO can handle these, so it would be a problem if they get added later, and non-interleaved formats get accepted erroneously. Let them gracefully fall back to other formats. Most AOs actually would fall back, but to an unrelated formats. This is covered by this commit too, and if possible they should pick the interleaved variant if a non-interleaved format is requested. --- audio/out/ao_pcm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'audio/out/ao_pcm.c') diff --git a/audio/out/ao_pcm.c b/audio/out/ao_pcm.c index f7d793700d..e94e6b569a 100644 --- a/audio/out/ao_pcm.c +++ b/audio/out/ao_pcm.c @@ -118,6 +118,9 @@ static int init(struct ao *ao) if (!priv->outputfilename) priv->outputfilename = talloc_strdup(priv, priv->waveheader ? "audiodump.wav" : "audiodump.pcm"); + + ao->format = af_fmt_from_planar(ao->format); + if (priv->waveheader) { // WAV files must have one of the following formats -- cgit v1.2.3