lavfi/(a)showinfo: use link frame counter instead of local counter.
lavu/opt: check if class is NULL too

Signed-off-by: Paul B Mahol <onemda@gmail.com>
avcodec/jpeg2000dec: get_qcx, fix stack and heap overwrites

This is likely remotely exploitable
Fix ported from j2kdec
No uptodate FFmpeg release should be affected by this

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>