Merge commit '146b187113e3cc20c2a97c5f264da13e701ca247' into release/1.1

* commit '146b187113e3cc20c2a97c5f264da13e701ca247':
  lavc: Check the image size before calling get_buffer

Conflicts:
	libavcodec/utils.c

See: 668494acd8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-08-08 14:45:18 +02:00

View File

@@ -540,6 +540,11 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
{
if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
if (av_image_check_size(avctx->width, avctx->height, 0, avctx))
return AVERROR_INVALIDDATA;
}
ff_init_buffer_info(avctx, frame);
return avctx->get_buffer(avctx, frame);