* [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing
@ 2025-04-06 11:16 Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 1/4] avformat/hls: Add cmfv and cmfa to allowed_extensions Michael Niedermayer
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Michael Niedermayer @ 2025-04-06 11:16 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Hi all
This patchset adds all the extensions i found on trac and its links to
allowed_extensions for hls.
There was one testcase only so most of this is untested. It may be
needed to add the extensions also to demuxers or as exceptions
specific to hls elsewhere.
Thanks
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 1/4] avformat/hls: Add cmfv and cmfa to allowed_extensions
2025-04-06 11:16 [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Michael Niedermayer
@ 2025-04-06 11:16 ` Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 2/4] avformat/hls: Point user to how to easily contribute a fix for missing extensions Michael Niedermayer
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Michael Niedermayer @ 2025-04-06 11:16 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: www.nicovideo.jp
Fixes: Ticket11526
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/hls.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 4ee142f0c4c..26d9081260c 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2628,7 +2628,9 @@ static const AVOption hls_options[] = {
OFFSET(prefer_x_start), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS},
{"allowed_extensions", "List of file extensions that hls is allowed to access",
OFFSET(allowed_extensions), AV_OPT_TYPE_STRING,
- {.str = "3gp,aac,avi,ac3,eac3,flac,mkv,m3u8,m4a,m4s,m4v,mpg,mov,mp2,mp3,mp4,mpeg,mpegts,ogg,ogv,oga,ts,vob,wav"},
+ {.str = "3gp,aac,avi,ac3,eac3,flac,mkv,m3u8,m4a,m4s,m4v,mpg,mov,mp2,mp3,mp4,mpeg,mpegts,ogg,ogv,oga,ts,vob,wav"
+ ",cmfv,cmfa" // Ticket11526 www.nicovideo.jp
+ },
INT_MIN, INT_MAX, FLAGS},
{"extension_picky", "Be picky with all extensions matching",
OFFSET(extension_picky), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS},
--
2.49.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 2/4] avformat/hls: Point user to how to easily contribute a fix for missing extensions
2025-04-06 11:16 [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 1/4] avformat/hls: Add cmfv and cmfa to allowed_extensions Michael Niedermayer
@ 2025-04-06 11:16 ` Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 3/4] avformat/hls: Add ec3 to allowed_extensions Michael Niedermayer
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Michael Niedermayer @ 2025-04-06 11:16 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/hls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 26d9081260c..6ef1c122322 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -746,7 +746,7 @@ static int test_segment(AVFormatContext *s, const AVInputFormat *in_fmt, struct
+ 2*(ff_match_url_ext(seg->url, c->allowed_extensions) > 0);
if (!matchA) {
- av_log(s, AV_LOG_ERROR, "URL %s is not in allowed_extensions\n", seg->url);
+ av_log(s, AV_LOG_ERROR, "URL %s is not in allowed_extensions, consider updating hls.c and submitting a patch to ffmpeg-devel, if this should be added\n", seg->url);
return AVERROR_INVALIDDATA;
}
--
2.49.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 3/4] avformat/hls: Add ec3 to allowed_extensions
2025-04-06 11:16 [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 1/4] avformat/hls: Add cmfv and cmfa to allowed_extensions Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 2/4] avformat/hls: Point user to how to easily contribute a fix for missing extensions Michael Niedermayer
@ 2025-04-06 11:16 ` Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 4/4] avformat/hls: add fmp4 " Michael Niedermayer
2025-04-06 13:20 ` [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Leo Izen
4 siblings, 0 replies; 7+ messages in thread
From: Michael Niedermayer @ 2025-04-06 11:16 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes part of Ticket11435
Fixes: Elisa Viihde (Finnish online recording service)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/hls.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 6ef1c122322..760a354ab90 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2630,6 +2630,7 @@ static const AVOption hls_options[] = {
OFFSET(allowed_extensions), AV_OPT_TYPE_STRING,
{.str = "3gp,aac,avi,ac3,eac3,flac,mkv,m3u8,m4a,m4s,m4v,mpg,mov,mp2,mp3,mp4,mpeg,mpegts,ogg,ogv,oga,ts,vob,wav"
",cmfv,cmfa" // Ticket11526 www.nicovideo.jp
+ ",ec3" // part of Ticket11435 (Elisa Viihde (Finnish online recording service))
},
INT_MIN, INT_MAX, FLAGS},
{"extension_picky", "Be picky with all extensions matching",
--
2.49.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 4/4] avformat/hls: add fmp4 to allowed_extensions
2025-04-06 11:16 [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Michael Niedermayer
` (2 preceding siblings ...)
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 3/4] avformat/hls: Add ec3 to allowed_extensions Michael Niedermayer
@ 2025-04-06 11:16 ` Michael Niedermayer
2025-04-06 13:20 ` [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Leo Izen
4 siblings, 0 replies; 7+ messages in thread
From: Michael Niedermayer @ 2025-04-06 11:16 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: yt-dlp/issues/12700
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/hls.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 760a354ab90..df0823260a0 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2631,6 +2631,7 @@ static const AVOption hls_options[] = {
{.str = "3gp,aac,avi,ac3,eac3,flac,mkv,m3u8,m4a,m4s,m4v,mpg,mov,mp2,mp3,mp4,mpeg,mpegts,ogg,ogv,oga,ts,vob,wav"
",cmfv,cmfa" // Ticket11526 www.nicovideo.jp
",ec3" // part of Ticket11435 (Elisa Viihde (Finnish online recording service))
+ ",fmp4" // https://github.com/yt-dlp/yt-dlp/issues/12700
},
INT_MIN, INT_MAX, FLAGS},
{"extension_picky", "Be picky with all extensions matching",
--
2.49.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing
2025-04-06 11:16 [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Michael Niedermayer
` (3 preceding siblings ...)
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 4/4] avformat/hls: add fmp4 " Michael Niedermayer
@ 2025-04-06 13:20 ` Leo Izen
2025-04-06 13:43 ` Michael Niedermayer
4 siblings, 1 reply; 7+ messages in thread
From: Leo Izen @ 2025-04-06 13:20 UTC (permalink / raw)
To: ffmpeg-devel
On 4/6/25 7:16 AM, Michael Niedermayer wrote:
> Hi all
>
> This patchset adds all the extensions i found on trac and its links to
> allowed_extensions for hls.
> There was one testcase only so most of this is untested. It may be
> needed to add the extensions also to demuxers or as exceptions
> specific to hls elsewhere.
>
If the issue at hand is that bad extensions can cause invalid
demuxers/decoders to be probed, why don't we just use a demuxer or
decoder whitelist? We already have code to support this.
It feels like we're going to be sending these sorts of "add this one
extension we didn't think about" patch over and over again when we could
have just solved the original problem. This feels like an XY problem, we
really want to accomplish X but we're solving Y because we believe it
will fix X. Rather than just fixing X.
- Leo Izen (Traneptora)
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing
2025-04-06 13:20 ` [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Leo Izen
@ 2025-04-06 13:43 ` Michael Niedermayer
0 siblings, 0 replies; 7+ messages in thread
From: Michael Niedermayer @ 2025-04-06 13:43 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 1198 bytes --]
Hi
On Sun, Apr 06, 2025 at 09:20:58AM -0400, Leo Izen wrote:
> On 4/6/25 7:16 AM, Michael Niedermayer wrote:
> > Hi all
> >
> > This patchset adds all the extensions i found on trac and its links to
> > allowed_extensions for hls.
> > There was one testcase only so most of this is untested. It may be
> > needed to add the extensions also to demuxers or as exceptions
> > specific to hls elsewhere.
> >
>
> If the issue at hand is that bad extensions can cause invalid
> demuxers/decoders to be probed, why don't we just use a demuxer or decoder
> whitelist? We already have code to support this.
The issue at hand is that i have no testcases.
People either post testcases for 3rd party tools not for FFmpeg
or dead links or half m3u8 files
I could also say the issue is that we have noone like carl who
replied to users and asked for full replicatable bug reports.
Once we have replicatable testcases, we can discuss which is the
smartest way to fix them.
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-04-06 13:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-06 11:16 [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 1/4] avformat/hls: Add cmfv and cmfa to allowed_extensions Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 2/4] avformat/hls: Point user to how to easily contribute a fix for missing extensions Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 3/4] avformat/hls: Add ec3 to allowed_extensions Michael Niedermayer
2025-04-06 11:16 ` [FFmpeg-devel] [PATCH 4/4] avformat/hls: add fmp4 " Michael Niedermayer
2025-04-06 13:20 ` [FFmpeg-devel] [PATCH 0/4] avformat/hls: Some extension fixes that need testing Leo Izen
2025-04-06 13:43 ` Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git