lavc/roqvideodec: propagate reget_buffer() error code

This commit is contained in:
Stefano Sabatini 2012-09-09 11:11:43 +02:00
parent d2c70ec07f
commit b1fee1be61
1 changed files with 3 additions and 2 deletions

View File

@ -188,11 +188,12 @@ static int roq_decode_frame(AVCodecContext *avctx,
int buf_size = avpkt->size; int buf_size = avpkt->size;
RoqContext *s = avctx->priv_data; RoqContext *s = avctx->priv_data;
int copy= !s->current_frame->data[0]; int copy= !s->current_frame->data[0];
int ret;
s->current_frame->reference = 3; s->current_frame->reference = 3;
if (avctx->reget_buffer(avctx, s->current_frame)) { if ((ret = avctx->reget_buffer(avctx, s->current_frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n"); av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n");
return -1; return ret;
} }
if(copy) if(copy)