Skip to content

Commit 48c0dba

Browse files
committed
avformat/hls: Fix Youtube AAC
Fixes: Ticket11435 Fixes: yt-dlp -f 234+270 https://www.youtube.com/live/l8PMl7tUDIE Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 parent 2431fd0 commit 48c0dba

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libavformat/hls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,8 @@ static int test_segment(AVFormatContext *s, const AVInputFormat *in_fmt, struct
753753
if (in_fmt->extensions) {
754754
matchF = av_match_ext( seg->url, in_fmt->extensions)
755755
+ 2*(ff_match_url_ext(seg->url, in_fmt->extensions) > 0);
756-
if(av_match_name("mp4", in_fmt->name)) {
756+
// Youtube uses aac files with .ts extension
757+
if(av_match_name("mp4", in_fmt->name) || av_match_name("aac", in_fmt->name)) {
757758
matchF |= av_match_ext( seg->url, "ts,m2t,m2ts,mts,mpg,m4s,mpeg,mpegts")
758759
+ 2*(ff_match_url_ext(seg->url, "ts,m2t,m2ts,mts,mpg,m4s,mpeg,mpegts") > 0);
759760
}

0 commit comments

Comments
 (0)