ViacomCBS beats estimates for second-quarter revenue