avcodec/mpegvideo: check that linesize is not too small