这是indexloc提供的服务,不要输入任何密码
Skip to content

The '\f' character is not consider in a regular expression when parsing AttributeValue in the m3u8 playlist (HlsPlaylistParser.java) #2420

@Kabachel

Description

@Kabachel

Version

ExoPlayer 2.18.4

More version details

This is also reproduced on new versions, including in the sample app.

Devices that reproduce the issue

Pixel 8a Android 35

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Play the attached media in the demo app

Expected result

The media plays successfully

In specification https://datatracker.ietf.org/doc/html/rfc8216#section-4.2
Only symbols '\n', '\r' and '"' MUST NOT appear in a quoted-string. And it follows that '\f' must be a valid character.

Actual result

2025-05-14 12:34:33.509 4630-4705 ExoPlayerImplInternal androidx.media3.demo.main E Playback error
androidx.media3.exoplayer.ExoPlaybackException: Source error
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:864)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:834)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: androidx.media3.common.ParserException: Couldn't match NAME="(.+?)" in #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME=" SoundHandler",DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en",URI="uri_sent_by_mail" {contentIsMalformed=true, dataType=4}
at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parseStringAttr(HlsPlaylistParser.java:1446)
at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parseMultivariantPlaylist(HlsPlaylistParser.java:552)
at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:304)
at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:76)
at androidx.media3.exoplayer.upstream.ParsingLoadable.load(ParsingLoadable.java:184)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:453)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)

Media

Media sent by mail.

Bug Report

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions