avcodec/mpegvideo_enc: check qmin/qmax

Fixes Ticket2990

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pngdec: check for stream end in png_decode_idat()

Fix infinite loop
Fix Ticket2978

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