diff options
author | Måns Rullgård <mans@mansr.com> | 2009-03-10 02:27:38 +0300 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2009-03-10 02:27:38 +0300 |
commit | f49568a467ef50ed8cd1f2fde80bdf37ecadb84b (patch) | |
tree | 1f5593da08ac36e7a0c1570c977eae8c2b060258 /libavcodec/bitstream.c | |
parent | 75800dce2bf4d2989849e5cb5ae27eab273c835f (diff) |
Fix unaligned access in ff_copy_bits()
Originally committed as revision 17921 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bitstream.c')
-rw-r--r-- | libavcodec/bitstream.c | 4 |
1 files 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<words; i++) put_bits(pb, 16, be2me_16(srcw[i])); + for(i=0; i<words; i++) put_bits(pb, 16, AV_RB16(&srcw[i])); }else{ for(i=0; put_bits_count(pb)&31; i++) put_bits(pb, 8, src[i]); @@ -92,7 +92,7 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length) skip_put_bytes(pb, 2*words-i); } - put_bits(pb, bits, be2me_16(srcw[words])>>(16-bits)); + put_bits(pb, bits, AV_RB16(&srcw[words])>>(16-bits)); } /* VLC decoding */ |