Merge "CCodec: harden against nullptr/out-of-memory"