4xm: Check available space in read_huffman_tables()

Fixes integer overflow and out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4xm: add assert to check that the pointer from read_huffman_tables is within the array

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4xm: remove avcodec_get_frame_defaults() calls

They are not needed anymore

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