Various MediaCodec fixes