From c2500635235d809e0c0ac526a7e13072ab7c8900 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 29 Feb 2012 06:20:22 +0100 Subject: get_buffers: Check that pix_fmt is not NONE. This is somewhat redundant as no decoder should call get_buffer() with such argument. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index 06fb2535a9..c43192d8f9 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -553,7 +553,7 @@ static int codec_get_buffer(AVCodecContext *s, AVFrame *frame) FrameBuffer *buf; int ret, i; - if(av_image_check_size(s->width, s->height, 0, s)) + if(av_image_check_size(s->width, s->height, 0, s) || s->pix_fmt<0) return -1; if (!ist->buffer_pool && (ret = alloc_buffer(s, ist, &ist->buffer_pool)) < 0) -- cgit v1.2.3