mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
qtrle: return a meaningful error code.
This commit is contained in:
parent
048ffb9bb2
commit
8f17829455
@ -389,14 +389,15 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
|
|||||||
int header, start_line;
|
int header, start_line;
|
||||||
int height, row_ptr;
|
int height, row_ptr;
|
||||||
int has_palette = 0;
|
int has_palette = 0;
|
||||||
|
int ret;
|
||||||
|
|
||||||
bytestream2_init(&s->g, avpkt->data, avpkt->size);
|
bytestream2_init(&s->g, avpkt->data, avpkt->size);
|
||||||
s->frame.reference = 1;
|
s->frame.reference = 1;
|
||||||
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE |
|
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE |
|
||||||
FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE;
|
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");
|
av_log (s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
|
||||||
return -1;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if this frame is even supposed to change */
|
/* check if this frame is even supposed to change */
|
||||||
|
Loading…
Reference in New Issue
Block a user