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.
lavu/bprint: add const to av_bprint_is_complete() argument.
Support raw dvdsub palette as stored on normal dvd's

This is how the palette is stored on dvd's. Currently
only xbmc passes the palette information to libavcodec
this way.
Check return value of avio_seek and avoid modifying state if it fails

The code still modifies state if the timestamp is not found. Not
sure exactly how to avoid that.
asf hacks
if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly
added: Ticket #7187, TV Teletext support for DVB EBU Teletext streams
Don't accept mpegts PMT that isn't current