summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-05-26 11:02:51 +0200
committerAnton Khirnov <anton@khirnov.net>2013-05-28 08:04:07 +0200
commit72dee5f40b236c5eb9e68df39df80c68392269e3 (patch)
tree120ce7dea6a182bccea2be8187f77cd672db8a5d /libavcodec/wavpack.c
parent35596bd4f4d3c39eed838cf3a2613817d62dda99 (diff)
wavpack: don't set sample format in init.
We don't know whether it will be float until we look at the data.
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c5
1 files changed, 1 insertions, 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;