vdisp/aggregate codec probe: break if found

no need to iterate further if match found

If display misbehaves (outputs one codec multiple times), it causes
that codec to be elimited later (if the count != 1 for 2 devices) or
more in case of eg. 3 devices and the codec being listed 2-times for one
and no for another, it will be falsely accepted.
This commit is contained in:
Martin Pulec
2025-08-07 11:19:38 +02:00
parent b80eb8213d
commit 7b65da8cf5

View File

@@ -3,7 +3,7 @@
* @author Martin Pulec <pulec@cesnet.cz>
*/
/*
* Copyright (c) 2011-2023 CESNET, z. s. p. o.
* Copyright (c) 2011-2025 CESNET
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -289,6 +289,7 @@ static bool display_aggregate_get_property(void *state, int property, void *val,
for(sub_codec = 0; sub_codec < lens[i] / sizeof(codec_t); ++sub_codec) {
if(examined == codecs[i][sub_codec]) {
++found;
break;
}
}
}