summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/ffv1dec_template.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c
index 1b7f6c4..0b1d176 100644
--- a/libavcodec/ffv1dec_template.c
+++ b/libavcodec/ffv1dec_template.c
@@ -86,11 +86,19 @@ static av_always_inline int RENAME(decode_line)(FFV1Context *s, int w,
run_mode = 2;
}
}
+ if (sample[1][x - 1] == sample[0][x - 1]) {
+ while (run_count > 1 && w-x > 1) {
+ sample[1][x] = sample[0][x];
+ x++;
+ run_count--;
+ }
+ } else {
while (run_count > 1 && w-x > 1) {
sample[1][x] = RENAME(predict)(sample[1] + x, sample[0] + x);
x++;
run_count--;
}
+ }
run_count--;
if (run_count < 0) {
run_mode = 0;
OpenPOWER on IntegriCloud