lavc/utils: print error message on get_buffer related errors
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jul 2012 22:46:36 +0000 (00:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jul 2012 22:46:36 +0000 (00:46 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index 3d4b0c7..668965a 100644 (file)
@@ -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) *