aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/imc.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-02-02 08:28:07 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-02-02 08:28:07 +0000
commit4990eb5f491ffa4cbd963263e4b044e7bdce8c68 (patch)
treef5deac58fe50f3a89fee427df0107da76dd06eea /libavcodec/imc.c
parent0fe04628b95aa7d5b2787908fde55549aadb7076 (diff)
downloadffmpeg-4990eb5f491ffa4cbd963263e4b044e7bdce8c68.tar.gz
Do not modify input data
Originally committed as revision 11805 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r--libavcodec/imc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index ed2e20379b..35702f9b72 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -636,12 +636,12 @@ static int imc_decode_frame(AVCodecContext * avctx,
int flag;
int bits, summer;
int counter, bitscount;
- uint16_t *buf16 = (uint16_t *) buf;
+ uint16_t buf16[IMC_BLOCK_SIZE / 2];
for(i = 0; i < IMC_BLOCK_SIZE / 2; i++)
- buf16[i] = bswap_16(buf16[i]);
+ buf16[i] = bswap_16(((const uint16_t*)buf)[i]);
- init_get_bits(&q->gb, buf, IMC_BLOCK_SIZE * 8);
+ init_get_bits(&q->gb, (const uint8_t*)buf16, IMC_BLOCK_SIZE * 8);
/* Check the frame header */
imc_hdr = get_bits(&q->gb, 9);