avformat/hlsenc: Fix missing EXT-X-DISCONTINUITY tag in subtitle streams

The EXT-X-DISCONTINUITY tag was not being added to subtitle streams,
causing synchronization issues.i
This patch ensures that the tag is applied consistently across video and subtitle streams.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
Jonathan Baecker 2024-09-26 09:33:54 +02:00 committed by Steven Liu
parent faa366003b
commit f3d2624bfa

View File

@ -1668,7 +1668,7 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs)
ff_hls_write_playlist_header(hls->sub_m3u8_out, hls->version, hls->allowcache,
target_duration, sequence, PLAYLIST_TYPE_NONE, 0);
for (en = vs->segments; en; en = en->next) {
ret = ff_hls_write_file_entry(hls->sub_m3u8_out, 0, byterange_mode,
ret = ff_hls_write_file_entry(hls->sub_m3u8_out, en->discont, byterange_mode,
en->duration, 0, en->size, en->pos,
hls->baseurl, en->sub_filename, NULL, 0, 0, 0);
if (ret < 0) {