Merge "Revert "SoftAVCEnc: check requested memory size before allocation."" into klp-dev