avcodec/ass: add ff_ass_add_rect_bprint() helper
avcodec/jacosubdec: add some memory checks
avcodec/microdvddec: add some memory checks
avcodec/movtextdec: add some memory checks
avcodec/mpl2dec: add some memory checks
avcodec/realtextdec: add some memory checks
avcodec/samidec: add some memory checks
avcodec/srtdec: add some memory checks
avcodec/subviewerdec: add some memory checks
avcodec/textdec: add some memory checks
avcodec/webvttdec: add some memory checks
avformat/assenc: return correct error code
avformat/assenc: mux all extradata at once

Before this commit, the code was muxing up to the 2nd line after
"[Events]" (assuming it to be the "Format:" line). The remaining are
generally "Comment:" directives which can stay in that place. mkvextract
behaves that way so it seems there is no reason for that extra
complexity.