Browse Source

avcodec/midivid: only multiple of 4 width/height are possible

tags/n4.3
Paul B Mahol 5 years ago
parent
commit
e007059d66
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/midivid.c

+ 3
- 0
libavcodec/midivid.c View File

@@ -238,6 +238,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
MidiVidContext *s = avctx->priv_data;
int ret = av_image_check_size(avctx->width, avctx->height, 0, avctx);

if (avctx->width & 3 || avctx->height & 3)
ret = AVERROR_INVALIDDATA;

if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Invalid image size %dx%d.\n",
avctx->width, avctx->height);


Loading…
Cancel
Save