ffv1enc: Check return value of av_frame_ref()

Fixes CID1026740
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
h264_ps: fix memleak in ff_h264_decode_picture_parameter_set()

Fixes: CID1026763
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
jpeg2000: Fix Unintended sign extension in malloc arguments of cblk.

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