aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-04 00:45:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-04 00:46:08 +0200
commitf91b7d803019b6fa856216d6e2ac2215d5e99073 (patch)
tree3db5862030cae77d279446aeaabcd065fd514cd2 /cmdutils.c
parent86e107a7d468666189506d3edd4f4b5ca14cd59e (diff)
downloadffmpeg-f91b7d803019b6fa856216d6e2ac2215d5e99073.tar.gz
mdutils: print error message on error get_buffer related errors
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 36f82c94bf..8b2bcd7d85 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1254,6 +1254,7 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu
if ((ret = av_image_alloc(buf->base, buf->linesize, w, h,
s->pix_fmt, 32)) < 0) {
av_freep(&buf);
+ av_log(s, AV_LOG_ERROR, "alloc_buffer: av_image_alloc() failed\n");
return ret;
}
/* XXX this shouldn't be needed, but some tests break without this line
@@ -1289,8 +1290,10 @@ int codec_get_buffer(AVCodecContext *s, AVFrame *frame)
FrameBuffer *buf;
int ret, i;
- if(av_image_check_size(s->width, s->height, 0, s) || s->pix_fmt<0)
+ if(av_image_check_size(s->width, s->height, 0, s) || s->pix_fmt<0) {
+ av_log(s, AV_LOG_ERROR, "codec_get_buffer: image parameters invalid\n");
return -1;
+ }
if (!*pool && (ret = alloc_buffer(pool, s, pool)) < 0)
return ret;