summaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1dec_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ffv1dec_template.c')
-rw-r--r--libavcodec/ffv1dec_template.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c
index fecdbd0..25032fe 100644
--- a/libavcodec/ffv1dec_template.c
+++ b/libavcodec/ffv1dec_template.c
@@ -50,6 +50,11 @@ static av_always_inline int RENAME(decode_line)(FFV1Context *s, int w,
for (x = 0; x < w; x++) {
int diff, context, sign;
+ if (!(x & 1023)) {
+ if (is_input_end(s))
+ return AVERROR_INVALIDDATA;
+ }
+
context = RENAME(get_context)(p, sample[1] + x, sample[0] + x, sample[1] + x);
if (context < 0) {
context = -context;
OpenPOWER on IntegriCloud