diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 78cb469842b53..af63773e2ea74 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -147,6 +147,7 @@ struct format_hack { bool no_seek_on_no_duration : 1; bool readall_on_no_streamseek : 1; bool first_frame_only : 1; + bool no_ext_picky : 1; // set "extension_picky" to false }; #define BLACKLIST(fmt) {fmt, .ignore = true} @@ -162,7 +163,7 @@ static const struct format_hack format_hacks[] = { {"mp3", "audio/mpeg", 24, 0.5}, {"mp3", NULL, 24, .max_probe = true}, - {"hls", .no_stream = true, .clear_filepos = true}, + {"hls", .no_stream = true, .clear_filepos = true, .no_ext_picky = true}, {"dash", .no_stream = true, .clear_filepos = true}, {"sdp", .clear_filepos = true, .is_network = true, .no_seek = true}, {"mpeg", .use_stream_ids = true}, @@ -1005,6 +1006,9 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check) "analyzeduration to %f\n", analyze_duration); } + if (priv->format_hack.no_ext_picky) + av_dict_set_int(&dopts, "extension_picky", 0, 0); + if ((priv->avif_flags & AVFMT_NOFILE) || priv->format_hack.no_stream) { mp_setup_av_network_options(&dopts, priv->avif->name, demuxer->global, demuxer->log);