]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eamad.c
Merge commit '827a05eaa9482e9ac2a17f7f2e42ead07c1d7574'
[ffmpeg] / libavcodec / eamad.c
index 23b1a3c94485fe2ac490453cf4ae8886a5017e52..7f28abbafeae6b203952aebdea2137c0ed3d0647 100644 (file)
@@ -54,7 +54,7 @@ typedef struct MadContext {
     GetBitContext gb;
     void *bitstream_buf;
     unsigned int bitstream_buf_size;
-    DECLARE_ALIGNED(16, int16_t, block)[64];
+    DECLARE_ALIGNED(32, int16_t, block)[64];
     ScanTable scantable;
     uint16_t quant_matrix[64];
     int mb_x;
@@ -284,7 +284,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     if (avctx->width != width || avctx->height != height) {
         av_frame_unref(s->last_frame);
-        if((width * height)/2048*7 > bytestream2_get_bytes_left(&gb))
+        if((width * (int64_t)height)/2048*7 > bytestream2_get_bytes_left(&gb))
             return AVERROR_INVALIDDATA;
         if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
             return ret;