Commit 59cca504 authored by Sebastian Vater's avatar Sebastian Vater Committed by Ronald S. Bultje

Ensure that width and height are > 0. avcodec_open() itself only checks that

they are >= 0.

Patch by Sebastian Vater <cdgs basty googlemail com>.

Originally committed as revision 23080 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 666d7d18
......@@ -115,6 +115,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
if ((err = avcodec_check_dimensions(avctx, avctx->width, avctx->height)))
return err;
s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary
s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE);
if (!s->planebuf)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment