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