demux/demux_lavf: pass-through filename for HLS

Fixes local HLS playback.

After FFmpeg@6b1f68c commit HLS is only processed if file extension
matches RFC8216 requirement.
This commit is contained in:
Kacper Michajłow 2023-05-16 00:33:21 +02:00 committed by Leo Izen
parent 1a649df00a
commit fe4f03f42c
No known key found for this signature in database
GPG Key ID: 5A71C331FD2FA19A
1 changed files with 3 additions and 2 deletions

View File

@ -467,8 +467,9 @@ static int lavf_check_file(demuxer_t *demuxer, enum demux_check check)
}
AVProbeData avpd = {
// Disable file-extension matching with normal checks
.filename = check <= DEMUX_CHECK_REQUEST ? priv->filename : "",
// Disable file-extension matching with normal checks, except for HLS
.filename = av_match_ext(priv->filename, "m3u8,m3u") ||
check <= DEMUX_CHECK_REQUEST ? priv->filename : "",
.buf_size = 0,
.buf = av_mallocz(PROBE_BUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE),
};