avcodec/jpeg2000dwt: add special cases for handling length 1 in 5/3 decode
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Jun 2015 18:00:39 +0000 (20:00 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Jun 2015 18:16:53 +0000 (20:16 +0200)
Fixes Ticket4630

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dwt.c

index ceceda3..a5eb0b7 100644 (file)
@@ -290,8 +290,11 @@ static void sr_1d53(int *p, int i0, int i1)
 {
     int i;
 
-    if (i1 == i0 + 1)
+    if (i1 <= i0 + 1) {
+        if (i0 == 1)
+            p[1] >>= 1;
         return;
+    }
 
     extend53(p, i0, i1);