summaryrefslogtreecommitdiff
path: root/libavcodec/alacenc.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-01 15:40:29 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-01 15:40:29 +0000
commit43d7c6118d64a8b2772e2d9e0c13413968e776f1 (patch)
treef5e7d4b37da6f22275c2cad19b404ee0e5dba362 /libavcodec/alacenc.c
parentec656755044d29e8f0b0a50ad1c9fd297bcae484 (diff)
put_bits can only reliably write up to 31 bit bits, above it relies on
undefined shift behaviour. Document this, fix the assert and add a put_bits32 to handle writing 32 bits and use that where necessary. Originally committed as revision 20124 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alacenc.c')
-rw-r--r--libavcodec/alacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index 5e8defbe8b..691e6df41e 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -123,7 +123,7 @@ static void write_frame_header(AlacEncodeContext *s, int is_verbatim)
put_bits(&s->pbctx, 1, 1); // Sample count is in the header
put_bits(&s->pbctx, 2, 0); // FIXME: Wasted bytes field
put_bits(&s->pbctx, 1, is_verbatim); // Audio block is verbatim
- put_bits(&s->pbctx, 32, s->avctx->frame_size); // No. of samples in the frame
+ put_bits32(&s->pbctx, s->avctx->frame_size); // No. of samples in the frame
}
static void calc_predictor_params(AlacEncodeContext *s, int ch)