[FFmpeg-cvslog] lavc/utils: print error message on get_buffer related errors

Michael Niedermayer git at videolan.org
Wed Jul 4 01:12:24 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jul  4 00:46:36 2012 +0200| [f339ebc1ff0d5db9df156f3bb9b8584568bb5b9d] | committer: Michael Niedermayer

lavc/utils: print error message on get_buffer related errors

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f339ebc1ff0d5db9df156f3bb9b8584568bb5b9d
---

 libavcodec/utils.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 3d4b0c7..668965a 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) *



More information about the ffmpeg-cvslog mailing list