diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-11-19 10:33:54 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-01-14 11:37:31 +0100 |
commit | 8f17829455308c9c988149d9c895913bf9e8af60 (patch) | |
tree | 57e54a3c2df1cc6c345f6b7d1acd5df99dd419e7 /libavcodec | |
parent | 048ffb9bb26f30f1995400b8cd3809221ba03441 (diff) | |
download | ffmpeg-8f17829455308c9c988149d9c895913bf9e8af60.tar.gz |
qtrle: return a meaningful error code.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/qtrle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 02091d04bf..32ad5d66b7 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -389,14 +389,15 @@ static int qtrle_decode_frame(AVCodecContext *avctx, int header, start_line; int height, row_ptr; int has_palette = 0; + int ret; bytestream2_init(&s->g, avpkt->data, avpkt->size); s->frame.reference = 1; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE; - if (avctx->reget_buffer(avctx, &s->frame)) { + if ((ret = avctx->reget_buffer(avctx, &s->frame)) < 0) { av_log (s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); - return -1; + return ret; } /* check if this frame is even supposed to change */ |