summaryrefslogtreecommitdiff
path: root/libavcodec/pcm-mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-08 02:28:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-08 02:51:45 +0100
commitbf807a5e874442aa3fe1b475459cdd509e34bff4 (patch)
treef8067bfb5e99b8b8e2716a7ea8519a4aaa8ac60f /libavcodec/pcm-mpeg.c
parent4cda8aa1c5bc58f8a7f53a21a19b03e7379bbcdc (diff)
parent6eda85e15b38863a627fd0602098aa3250174698 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits) sbrdsp.asm: convert all instructions to float/SSE ones. dv: cosmetics. dv: check buffer size before reading profile. Revert "AAC SBR: group some writes." udp: Print an error message if bind fails cook: extend channel uncoupling tables so the full bit range is covered. roqvideo: cosmetics. roqvideo: convert to bytestream2 API. dca: don't use av_clip_uintp2(). wmall: fix build with -DDEBUG enabled. smc: port to bytestream2 API. AAC SBR: group some writes. dsputil: remove shift parameter from scalarproduct_int16 SBR DSP: unroll sum_square rv34: remove dead code in intra availability check rv34: clean a bit availability checks. v4l2: update documentation tgq: convert to bytestream2 API. parser: remove forward declaration of MpegEncContext dca: prevent accessing static arrays with invalid indexes. ... Conflicts: doc/indevs.texi libavcodec/Makefile libavcodec/dca.c libavcodec/dvdata.c libavcodec/eatgq.c libavcodec/mmvideo.c libavcodec/roqvideodec.c libavcodec/smc.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pcm-mpeg.c')
-rw-r--r--libavcodec/pcm-mpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pcm-mpeg.c b/libavcodec/pcm-mpeg.c
index 4269dd4443..aea3ff79c6 100644
--- a/libavcodec/pcm-mpeg.c
+++ b/libavcodec/pcm-mpeg.c
@@ -158,7 +158,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
/* There's always an even number of channels in the source */
num_source_channels = FFALIGN(avctx->channels, 2);
- sample_size = (num_source_channels * avctx->bits_per_coded_sample) >> 3;
+ sample_size = (num_source_channels * (avctx->sample_fmt == AV_SAMPLE_FMT_S16 ? 16 : 24)) >> 3;
samples = buf_size / sample_size;
/* get output buffer */