vdisp/sdl3 probe: do output codec_t multiple times

It will actually cause problems to callers those count the occurences
like vdisp/aggregate.
This commit is contained in:
Martin Pulec
2025-08-07 11:04:21 +02:00
parent 6e1277a08f
commit b80eb8213d

View File

@@ -605,9 +605,14 @@ get_ug_to_sdl_format(const struct fmt_data *supp_fmts, codec_t ug_codec)
static int
get_supported_pfs(const struct fmt_data *supp_fmts, codec_t *codecs)
{
bool codec_set[VC_COUNT]= {};
int i = 0;
for (; supp_fmts[i].ug_codec != VC_NONE; ++i) {
if (codec_set[supp_fmts[i].ug_codec]) {
continue;
}
codecs[i] = supp_fmts[i].ug_codec;
codec_set[supp_fmts[i].ug_codec] = true;
}
return i;
}