aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-05-05 23:42:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-07-16 19:06:27 +0200
commit05e253684ebc2985b0c4662a9f86e4475c20a5e4 (patch)
tree90ad6268e23c6ed9c9f25a20bcb2ddf4cab8da3f
parent3be0bcbef6aa9b8b77766ce1e4f7320b1d33b2d7 (diff)
downloadffmpeg-05e253684ebc2985b0c4662a9f86e4475c20a5e4.tar.gz
avcodec/fic: Avoid some magic numbers related to cursors
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c6a11714c4b1227be62cbc36651ccfc415e8e623) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/fic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index b7e0da6ce9..e1b72b9448 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -82,6 +82,7 @@ static const uint8_t fic_qmat_lq[64] = {
static const uint8_t fic_header[7] = { 0, 0, 1, 'F', 'I', 'C', 'V' };
#define FIC_HEADER_SIZE 27
+#define CURSOR_OFFSET 59
static av_always_inline void fic_idct(int16_t *blk, int step, int shift, int rnd)
{
@@ -416,7 +417,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
/* Draw cursor. */
if (!skip_cursor) {
- memcpy(ctx->cursor_buf, src + 59, 32 * 32 * 4);
+ memcpy(ctx->cursor_buf, src + CURSOR_OFFSET, sizeof(ctx->cursor_buf));
fic_draw_cursor(avctx, cur_x, cur_y);
}