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)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Mon, 23 Jul 2012 15:33:58 +0000 (11:33 -0400)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavcodec/wavpack.c

index 022a4ce..920e0b5 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 */