avformat/img2dec: make image2dec capable to be used from seperate demuxers

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat: add image2 alias pix demuxer

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat: add image2 brender pix demuxer

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/img2dec: Use avformat probing interface to identify format if it has not been otherwise identified

This is used only for distinguishing .pix formats for now.
Which is the only case that has image2 demuxers currently

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/img2dec: try to read PROBE_BUF_MIN instead of just enough for .pix probing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/img2_alias_pix: rewrite probe function

Fixes probetest failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/xbmdec: redesign parser to handle more cases

The new code is more tolerant on the syntax

Fixes decoding of bm1.xbm

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vp7: check buffer size

Fixes overread
Fixes Ticket 3501
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>