avcodec/jpeg2000dec: check that tp_end is after the start

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
bytestream2_init: assert that buf_size is valid

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>