From f49568a467ef50ed8cd1f2fde80bdf37ecadb84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Mon, 9 Mar 2009 23:27:38 +0000 Subject: [PATCH] Fix unaligned access in ff_copy_bits() Originally committed as revision 17921 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/bitstream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 57dd93e0ad..6781fe6cb0 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -83,7 +83,7 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length) if(length==0) return; if(CONFIG_SMALL || words < 16 || put_bits_count(pb)&7){ - for(i=0; i>(16-bits)); + put_bits(pb, bits, AV_RB16(&srcw[words])>>(16-bits)); } /* VLC decoding */