Fixed align issue when using s/w codec