Browse Source

lavc/utils: print error message on get_buffer related errors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
f339ebc1ff
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/utils.c

+ 3
- 1
libavcodec/utils.c View 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) *


Loading…
Cancel
Save