goldfish-codecs: fix crash and adapt to allocator3 am: 2294d506f9 am: 1715fdcf2e am: caf84356b3

Change-Id: I8a73c0071a63e9359f39c4241e4087b83e726497