lavc/mediacodec: refactor ff_AMediaCodecList_getCodecByType