Skip to content

Commit b80eb82

Browse files
committed
vdisp/sdl3 probe: do output codec_t multiple times
It will actually cause problems to callers those count the occurences like vdisp/aggregate.
1 parent 6e1277a commit b80eb82

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/video_display/sdl3.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,14 @@ get_ug_to_sdl_format(const struct fmt_data *supp_fmts, codec_t ug_codec)
605605
static int
606606
get_supported_pfs(const struct fmt_data *supp_fmts, codec_t *codecs)
607607
{
608+
bool codec_set[VC_COUNT]= {};
608609
int i = 0;
609610
for (; supp_fmts[i].ug_codec != VC_NONE; ++i) {
611+
if (codec_set[supp_fmts[i].ug_codec]) {
612+
continue;
613+
}
610614
codecs[i] = supp_fmts[i].ug_codec;
615+
codec_set[supp_fmts[i].ug_codec] = true;
611616
}
612617
return i;
613618
}

0 commit comments

Comments
 (0)