xvid: Check memory allocation