From f339ebc1ff0d5db9df156f3bb9b8584568bb5b9d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Jul 2012 00:46:36 +0200 Subject: [PATCH] lavc/utils: print error message on get_buffer related errors Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 3d4b0c7467..668965a237 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -440,8 +440,10 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) return -1; } - if(av_image_check_size(w, h, 0, s) || s->pix_fmt<0) + if(av_image_check_size(w, h, 0, s) || s->pix_fmt<0) { + av_log(s, AV_LOG_ERROR, "video_get_buffer: image parameters invalid\n"); return -1; + } if (!avci->buffer) { avci->buffer = av_mallocz((INTERNAL_BUFFER_SIZE+1) * -- 2.11.0