X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2F4xm.c;h=2b88c899d0a5d0f55eb0ca87874a2946df0360ec;hb=06476249cd2332e30b66576633b2827adf3478dd;hp=5547dfd87f2230c5287c78aa482b4db562593f57;hpb=f790410b6baa4ee53e8a5796e986de0cae78b073;p=ffmpeg diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 5547dfd87f2..2b88c899d0a 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -145,7 +145,7 @@ typedef struct FourXContext { int mv[256]; VLC pre_vlc; int last_dc; - DECLARE_ALIGNED(16, int16_t, block)[6][64]; + DECLARE_ALIGNED(32, int16_t, block)[6][64]; void *bitstream_buffer; unsigned int bitstream_buffer_size; int version; @@ -498,7 +498,7 @@ static int decode_i_block(FourXContext *f, int16_t *block) if (get_bits_left(&f->gb) < 2){ av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb)); - return -1; + return AVERROR_INVALIDDATA; } /* DC coef */ @@ -732,7 +732,7 @@ static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length) for (x = 0; x < width; x += 16) { unsigned int color[4] = { 0 }, bits; if (buf_end - buf < 8) - return -1; + return AVERROR_INVALIDDATA; // warning following is purely guessed ... color[0] = bytestream2_get_le16u(&g3); color[1] = bytestream2_get_le16u(&g3);