From 7b65da8cf5cb99bc73ad8a4418c6fe8213f41069 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Thu, 7 Aug 2025 11:19:38 +0200 Subject: [PATCH] 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. --- src/video_display/aggregate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_display/aggregate.c b/src/video_display/aggregate.c index 89df19601..2c8c7f14f 100644 --- a/src/video_display/aggregate.c +++ b/src/video_display/aggregate.c @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * 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; } } }