wavpack: set bits_per_raw_sample for S32 samples to properly identify 24-bit
authorHendrik Leppkes <h.leppkes@gmail.com>
Fri, 16 Dec 2011 21:43:35 +0000 (22:43 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Jun 2012 09:47:00 +0000 (11:47 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wavpack.c

index 3ba9961..08c75ed 100644 (file)
@@ -1202,6 +1202,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
         avctx->sample_fmt = AV_SAMPLE_FMT_S16;
     } else {
         avctx->sample_fmt = AV_SAMPLE_FMT_S32;
+        avctx->bits_per_raw_sample = ((frame_flags & 0x03) + 1) << 3;
     }
 
     /* get output buffer */