lavf: do not make a hard dep on internal subtitles helpers.
matroska_parse_frame: fix memleak

Fixes CID991856
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
audio_get_buffer: add assert to ensure nb_extended_buf has a safe value

May silence CID991853

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