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

rpza: return a meaningful error code.

This commit is contained in:
Anton Khirnov 2012-11-19 10:52:33 +01:00
parent 80cf2ebc59
commit e4ca055b3c

View File

@ -250,15 +250,16 @@ static int rpza_decode_frame(AVCodecContext *avctx,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
RpzaContext *s = avctx->priv_data;
int ret;
s->buf = buf;
s->size = buf_size;
s->frame.reference = 1;
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
if (avctx->reget_buffer(avctx, &s->frame)) {
if ((ret = avctx->reget_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
return -1;
return ret;
}
rpza_decode_stream(s);