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:
@@ -234,7 +234,7 @@ PluginManager::CreateReader(Reader** reader, int32* streamCount,
|
|||||||
|
|
||||||
// try each reader by calling it's Sniff function...
|
// try each reader by calling it's Sniff function...
|
||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
entry_ref ref = refs[i];
|
const entry_ref& ref = refs[i];
|
||||||
MediaPlugin* plugin = GetPlugin(ref);
|
MediaPlugin* plugin = GetPlugin(ref);
|
||||||
if (plugin == NULL) {
|
if (plugin == NULL) {
|
||||||
printf("PluginManager::CreateReader: GetPlugin failed\n");
|
printf("PluginManager::CreateReader: GetPlugin failed\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user