[webvtt] Don't parse single fragment files (#9034)

Partially addresses #5804
Authored by: seproDev
pull/9044/head
sepro 2024-01-20 06:08:55 +01:00 zatwierdzone przez GitHub
rodzic 811d298b23
commit f24e44e8cb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -369,7 +369,10 @@ class HlsFD(FragmentFD):
return output.getvalue().encode()
self.download_and_append_fragments(
ctx, fragments, info_dict, pack_func=pack_fragment, finish_func=fin_fragments)
if len(fragments) == 1:
self.download_and_append_fragments(ctx, fragments, info_dict)
else:
self.download_and_append_fragments(
ctx, fragments, info_dict, pack_func=pack_fragment, finish_func=fin_fragments)
else:
return self.download_and_append_fragments(ctx, fragments, info_dict)