From 72dee5f40b236c5eb9e68df39df80c68392269e3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 26 May 2013 11:02:51 +0200 Subject: [PATCH] wavpack: don't set sample format in init. We don't know whether it will be float until we look at the data. --- libavcodec/wavpack.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 44cedd5e75..1b2e62ef4f 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -716,10 +716,7 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx) WavpackContext *s = avctx->priv_data; s->avctx = avctx; - if (avctx->bits_per_coded_sample <= 16) - avctx->sample_fmt = AV_SAMPLE_FMT_S16P; - else - avctx->sample_fmt = AV_SAMPLE_FMT_S32P; + if (avctx->channels <= 2 && !avctx->channel_layout) avctx->channel_layout = (avctx->channels == 2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;