1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

qtrle: return a meaningful error code.

This commit is contained in:
Anton Khirnov 2012-11-19 10:33:54 +01:00
parent 048ffb9bb2
commit 8f17829455

View File

@ -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 */