avcodec/jpeg2000: Only allocate Jpeg2000Pass for the encoder
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 30 Nov 2017 20:51:56 +0000 (21:51 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 1 Dec 2017 22:12:07 +0000 (23:12 +0100)
commitb5587fd2c6ce39bad7a5e7ebb3bd86b6469648de
tree67609c94bb610354ab76aadb906f62cde6049535
parent0674087004538599797688785f6ac82358abc23b
avcodec/jpeg2000: Only allocate Jpeg2000Pass for the encoder

Reduces memory needed.
Fixes: OOM
Fixes: 4427/clusterfuzz-testcase-minimized-5106919271301120

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/j2kenc.c
libavcodec/jpeg2000.c
libavcodec/jpeg2000.h