]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/motionpixels.c
avcodec/ffwavesynth: Fix integer overflow in timestamps
[ffmpeg] / libavcodec / motionpixels.c
index a88b837b3ef7ab980a44d88b4c1fea611011f948..be45586e3debb8e16d938c4a4082b6fbdb980ea1 100644 (file)
@@ -201,6 +201,8 @@ static int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb)
     int i;
 
     i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1);
+    if (i < 0)
+        return i;
     return mp->codes[i].delta;
 }
 
@@ -290,7 +292,7 @@ static int mp_decode_frame(AVCodecContext *avctx,
     GetBitContext gb;
     int i, count1, count2, sz, ret;
 
-    if ((ret = ff_reget_buffer(avctx, mp->frame)) < 0)
+    if ((ret = ff_reget_buffer(avctx, mp->frame, 0)) < 0)
         return ret;
 
     /* le32 bitstream msb first */