summaryrefslogtreecommitdiff
path: root/libavcodec/flashsv.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-06-30 20:45:22 +0200
committerDiego Biurrun <diego@biurrun.de>2011-07-06 13:22:39 +0200
commita082e68030d6515a418c86db9a2ec529a7ed3ec8 (patch)
tree6a30404917b9cf4a502086872ad5498b340a4ae3 /libavcodec/flashsv.c
parentecf026f1aa8ffe170b5b8c577cae56a405ebafc8 (diff)
flashsv: Eliminate redundant variable indirection.
As a positive side-effect, this gets rid of the following warning: libavcodec/flashsv.c:190:38: warning: assignment discards ‘const’ qualifier from pointer target type
Diffstat (limited to 'libavcodec/flashsv.c')
-rw-r--r--libavcodec/flashsv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index e5c6a074f2..8305378f94 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -85,7 +85,6 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx)
static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
- const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
FlashSVContext *s = avctx->priv_data;
int h_blocks, v_blocks, h_part, v_part, i, j;
@@ -97,7 +96,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
if (buf_size < 4)
return -1;
- init_get_bits(&gb, buf, buf_size * 8);
+ init_get_bits(&gb, avpkt->data, buf_size * 8);
/* start to parse the bitstream */
s->block_width = 16 * (get_bits(&gb, 4) + 1);
@@ -179,7 +178,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
"error in decompression (reset) of block %dx%d\n", i, j);
/* return -1; */
}
- s->zstream.next_in = buf + get_bits_count(&gb) / 8;
+ s->zstream.next_in = avpkt->data + get_bits_count(&gb) / 8;
s->zstream.avail_in = size;
s->zstream.next_out = s->tmpblock;
s->zstream.avail_out = s->block_size * 3;