aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-21 04:34:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-21 04:35:02 +0100
commit0ee7505e63b01b4f1feeb021cc5306dc08b57dc5 (patch)
tree3d5e4ba423d30b068c2adb15da46a7a65f173dbf
parent9bbe24d455a35a91e3b19303922ce4d58fa8d4ad (diff)
parent02de44073a8e116ea177b53081219d32ef135ad8 (diff)
downloadffmpeg-0ee7505e63b01b4f1feeb021cc5306dc08b57dc5.tar.gz
Merge commit '02de44073a8e116ea177b53081219d32ef135ad8' into release/1.1
* commit '02de44073a8e116ea177b53081219d32ef135ad8': gifdec: refactor interleave end handling Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/gifdec.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index 09a6d74075..0b66d06712 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -256,26 +256,21 @@ static int gif_read_image(GifState *s)
case 1:
y1 += 8;
ptr += linesize * 8;
- if (y1 >= height) {
- y1 = pass ? 2 : 4;
- ptr = ptr1 + linesize * y1;
- pass++;
- }
break;
case 2:
y1 += 4;
ptr += linesize * 4;
- if (y1 >= height) {
- y1 = 1;
- ptr = ptr1 + linesize;
- pass++;
- }
break;
case 3:
y1 += 2;
ptr += linesize * 2;
break;
}
+ while (y1 >= height) {
+ y1 = 4 >> pass;
+ ptr = ptr1 + linesize * y1;
+ pass++;
+ }
} else {
ptr += linesize;
}