summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/rv10.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index ae8c5b34e9..51affa8769 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -707,7 +707,10 @@ static int rv10_decode_frame(AVCodecContext *avctx,
offset + FFMAX(size, size2) > buf_size)
return AVERROR_INVALIDDATA;
- if (rv10_decode_packet(avctx, buf + offset, size, size2) > 8 * size)
+ if ((ret = rv10_decode_packet(avctx, buf + offset, size, size2)) < 0)
+ return ret;
+
+ if (ret > 8 * size)
i++;
}