media kit: avoid useless copy of entry_ref

Copying an entry_ref is not cheap since the "name" field needs to be
allocated and copied separately everytime. Here it is not needed at all,
so let's just use a reference instead.

Change-Id: I1e572b69569cbb7437db147b483779245ec5e180
This commit is contained in:
PulkoMandy
2022-12-21 14:26:22 +01:00
parent a443628974
commit 9f9688d841
+1 -1
View File
@@ -234,7 +234,7 @@ PluginManager::CreateReader(Reader** reader, int32* streamCount,
// try each reader by calling it's Sniff function...
for (int32 i = 0; i < count; i++) {
entry_ref ref = refs[i];
const entry_ref& ref = refs[i];
MediaPlugin* plugin = GetPlugin(ref);
if (plugin == NULL) {
printf("PluginManager::CreateReader: GetPlugin failed\n");