aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/xan.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-02-01 23:24:35 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-02-01 23:24:35 +0000
commit9f5bd89506c140c75a0064cdfb92dcbd889efcd4 (patch)
tree5fd620e154e26b6182d761842d28f0c5f6c4362b /libavcodec/xan.c
parentaa819b9b7d9a08120f72bedc64c9f5b8f9cd2c7f (diff)
downloadffmpeg-9f5bd89506c140c75a0064cdfb92dcbd889efcd4.tar.gz
const
Originally committed as revision 11799 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r--libavcodec/xan.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index d92a4c6671..27fc16488a 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -206,7 +206,7 @@ static void xan_unpack(unsigned char *dest, const unsigned char *src, int dest_l
}
static inline void xan_wc3_output_pixel_run(XanContext *s,
- unsigned char *pixel_buffer, int x, int y, int pixel_count)
+ const unsigned char *pixel_buffer, int x, int y, int pixel_count)
{
int stride;
int line_inc;
@@ -284,8 +284,7 @@ static void xan_wc3_decode_frame(XanContext *s) {
unsigned char *opcode_buffer = s->buffer1;
int opcode_buffer_size = s->buffer1_size;
- unsigned char *imagedata_buffer = s->buffer2;
- int imagedata_buffer_size = s->buffer2_size;
+ const unsigned char *imagedata_buffer = s->buffer2;
/* pointers to segments inside the compressed chunk */
const unsigned char *huffman_segment;
@@ -301,8 +300,7 @@ static void xan_wc3_decode_frame(XanContext *s) {
xan_huffman_decode(opcode_buffer, huffman_segment, opcode_buffer_size);
if (imagedata_segment[0] == 2)
- xan_unpack(imagedata_buffer, &imagedata_segment[1],
- imagedata_buffer_size);
+ xan_unpack(s->buffer2, &imagedata_segment[1], s->buffer2_size);
else
imagedata_buffer = &imagedata_segment[1];