avcodec/jpeg2000dwt: add special cases for handling length 1 in 5/3 decode

Fixes Ticket4630

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-16 20:00:39 +02:00
parent 20657e05bc
commit 8294ec67b5
1 changed files with 4 additions and 1 deletions

View 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);