pcm_bluray: set bits_per_raw_sample for > 16-bit
authorHendrik Leppkes <h.leppkes@gmail.com>
Fri, 4 Feb 2011 22:45:15 +0000 (23:45 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 24 Oct 2011 16:41:03 +0000 (18:41 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pcm-mpeg.c

index 1e8a39e..5d3dd70 100644 (file)
@@ -75,6 +75,8 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
     }
     avctx->sample_fmt = avctx->bits_per_coded_sample == 16 ? AV_SAMPLE_FMT_S16 :
                                                              AV_SAMPLE_FMT_S32;
+    if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
+        avctx->bits_per_raw_sample = avctx->bits_per_coded_sample;
 
     /* get the sample rate. Not all values are known or exist. */
     switch (header[2] & 0x0f) {