[FFmpeg-devel] [PATCH 2/2] avformat/hls: .ts is always ok even if its a mov/mp4

Michael Niedermayer michael at niedermayer.cc
Tue Jan 28 16:24:21 EET 2025


Maybe fixes: 11435

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/hls.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index d2787ade46b..bdc3f5dbed5 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -754,6 +754,10 @@ static int test_segment(AVFormatContext *s, const AVInputFormat *in_fmt, struct
         if (in_fmt->extensions) {
             matchF =      av_match_ext(    seg->url, in_fmt->extensions)
                      + 2*(ff_match_url_ext(seg->url, in_fmt->extensions) > 0);
+            if(!strcmp(in_fmt->name, "mov,mp4,m4a,3gp,3g2,mj2")) {
+                matchF |=      av_match_ext(    seg->url, "ts")
+                          + 2*(ff_match_url_ext(seg->url, "ts") > 0);
+            }
         } else if (!strcmp(in_fmt->name, "mpegts"))
             matchF = 3;
 
-- 
2.48.1



More information about the ffmpeg-devel mailing list