Commit 3c6f7015 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/proresdec_lgpl: pass return values instead of discarding them

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 9a8811f4
...@@ -721,6 +721,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -721,6 +721,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
const uint8_t *buf = avpkt->data; const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size; int buf_size = avpkt->size;
int frame_hdr_size, pic_num, pic_data_size; int frame_hdr_size, pic_num, pic_data_size;
int ret;
ctx->frame = data; ctx->frame = data;
ctx->frame->pict_type = AV_PICTURE_TYPE_I; ctx->frame->pict_type = AV_PICTURE_TYPE_I;
...@@ -741,16 +742,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -741,16 +742,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
MOVE_DATA_PTR(frame_hdr_size); MOVE_DATA_PTR(frame_hdr_size);
if (ff_get_buffer(avctx, ctx->frame, 0) < 0) if ((ret = ff_get_buffer(avctx, ctx->frame, 0)) < 0)
return -1; return ret;
for (pic_num = 0; ctx->frame->interlaced_frame - pic_num + 1; pic_num++) { for (pic_num = 0; ctx->frame->interlaced_frame - pic_num + 1; pic_num++) {
pic_data_size = decode_picture_header(ctx, buf, buf_size, avctx); pic_data_size = decode_picture_header(ctx, buf, buf_size, avctx);
if (pic_data_size < 0) if (pic_data_size < 0)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
if (decode_picture(ctx, pic_num, avctx)) if ((ret = decode_picture(ctx, pic_num, avctx)) < 0)
return -1; return ret;
MOVE_DATA_PTR(pic_data_size); MOVE_DATA_PTR(pic_data_size);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment