summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-04-18 00:05:33 +0200
committerPaul B Mahol <onemda@gmail.com>2018-04-18 00:05:33 +0200
commit3c6f701524137d2dc58ff26efcf2e2c6d4b86413 (patch)
tree7595294c1b82ec6366d517a313b02ce07f102818
parent9a8811f478db4c24e9acb597274c5feace11f364 (diff)
downloadffmpeg-streaming-3c6f701524137d2dc58ff26efcf2e2c6d4b86413.zip
ffmpeg-streaming-3c6f701524137d2dc58ff26efcf2e2c6d4b86413.tar.gz
avcodec/proresdec_lgpl: pass return values instead of discarding them
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/proresdec_lgpl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index c86d433..3dbfb29 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -721,6 +721,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int frame_hdr_size, pic_num, pic_data_size;
+ int ret;
ctx->frame = data;
ctx->frame->pict_type = AV_PICTURE_TYPE_I;
@@ -741,16 +742,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
MOVE_DATA_PTR(frame_hdr_size);
- if (ff_get_buffer(avctx, ctx->frame, 0) < 0)
- return -1;
+ if ((ret = ff_get_buffer(avctx, ctx->frame, 0)) < 0)
+ return ret;
for (pic_num = 0; ctx->frame->interlaced_frame - pic_num + 1; pic_num++) {
pic_data_size = decode_picture_header(ctx, buf, buf_size, avctx);
if (pic_data_size < 0)
return AVERROR_INVALIDDATA;
- if (decode_picture(ctx, pic_num, avctx))
- return -1;
+ if ((ret = decode_picture(ctx, pic_num, avctx)) < 0)
+ return ret;
MOVE_DATA_PTR(pic_data_size);
}
OpenPOWER on IntegriCloud