const char *name, const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData, OMX_COMPONENTTYPE **component) {
OMX_AUDIO_CODINGTYPE codingType = OMX_AUDIO_CodingAutoDetect;
- char *componentRole = NULL;
+ const char *componentRole = NULL;
enum AVCodecID codecID = AV_CODEC_ID_NONE;
for (size_t i = 0; i < kNumAudioComponents; ++i) {
if (!strcasecmp(name, kAudioComponents[i].mName)) {
- componentRole = strdup(kAudioComponents[i].mRole);
+ componentRole = kAudioComponents[i].mRole;
codingType = kAudioComponents[i].mAudioCodingType;
codecID = kAudioComponents[i].mCodecID;
break;
return NULL;
OMX_VIDEO_CODINGTYPE codingType = OMX_VIDEO_CodingAutoDetect;
- char *componentRole = NULL;
+ const char *componentRole = NULL;
enum AVCodecID codecID = AV_CODEC_ID_NONE;
for (size_t i = 0; i < kNumVideoComponents; ++i) {
if (!strcasecmp(name, kVideoComponents[i].mName)) {
- componentRole = strdup(kVideoComponents[i].mRole);
+ componentRole = kVideoComponents[i].mRole;
codingType = kVideoComponents[i].mVideoCodingType;
codecID = kVideoComponents[i].mCodecID;
break;