diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c index 7f5c1daa23..772fb8d51c 100644 --- a/libavcodec/dsicinav.c +++ b/libavcodec/dsicinav.c @@ -244,6 +244,8 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, } } + bitmap_frame_size = FFMIN(cin->bitmap_size, bitmap_frame_size); + /* note: the decoding routines below assumes that * surface.width = surface.pitch */ switch (bitmap_frame_type) {