diff mbox series

[FFmpeg-devel] avformat/hlsenc: Fix missing EXT-X-DISCONTINUITY tag in subtitle streams

Message ID 20240926073354.395926-1-jonbae77@gmail.com
State New
Headers show
Series [FFmpeg-devel] avformat/hlsenc: Fix missing EXT-X-DISCONTINUITY tag in subtitle streams | expand

Checks

Context Check Description
andriy/commit_msg_x86 warning Please wrap lines in the body of the commit message between 60 and 72 characters.
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Jonathan Baecker Sept. 26, 2024, 7:33 a.m. UTC
The EXT-X-DISCONTINUITY tag was not being added to subtitle streams, causing synchronization issues. This patch ensures that the tag is applied consistently across video and subtitle streams.
---
 libavformat/hlsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steven Liu Sept. 26, 2024, 1:18 p.m. UTC | #1
Jonathan Baecker <jonbae77@gmail.com> 于2024年9月26日周四 15:59写道:
>
> The EXT-X-DISCONTINUITY tag was not being added to subtitle streams, causing synchronization issues. This patch ensures that the tag is applied consistently across video and subtitle streams.
> ---
>  libavformat/hlsenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 1e932b7..571d6b2 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -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) {
> --
> 2.46.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

LGTM


Thanks
Steven Liu Sept. 30, 2024, 11:22 a.m. UTC | #2
Steven Liu <lingjiujianke@gmail.com> 于2024年9月26日周四 21:18写道:
>
> Jonathan Baecker <jonbae77@gmail.com> 于2024年9月26日周四 15:59写道:
> >
> > The EXT-X-DISCONTINUITY tag was not being added to subtitle streams, causing synchronization issues. This patch ensures that the tag is applied consistently across video and subtitle streams.
> > ---
> >  libavformat/hlsenc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> > index 1e932b7..571d6b2 100644
> > --- a/libavformat/hlsenc.c
> > +++ b/libavformat/hlsenc.c
> > @@ -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) {
> > --
> > 2.46.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
> LGTM
pushed


Thanks
diff mbox series

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 1e932b7..571d6b2 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -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) {