Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0612d9f6
authored
May 13, 2019
by
olly
Committed by
Oliver Woodman
May 15, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Allow line terminators in ICY metadata
Issue: #5876 PiperOrigin-RevId: 247935822
parent
a849f43e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/metadata/icy/IcyDecoder.java
library/core/src/test/java/com/google/android/exoplayer2/metadata/icy/IcyDecoderTest.java
RELEASENOTES.md
View file @
0612d9f6
...
...
@@ -4,6 +4,8 @@
*
Fix NPE when using HLS chunkless preparation
(
[
#5868
](
https://github.com/google/ExoPlayer/issues/5868
)
).
*
Fix handling of line terminators in SHOUTcast ICY metadata
(
[
#5876
](
https://github.com/google/ExoPlayer/issues/5876
)
).
*
Offline: Add option to remove all downloads.
*
Decoders:
*
Prefer codecs that advertise format support over ones that do not, even if
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/icy/IcyDecoder.java
View file @
0612d9f6
...
...
@@ -31,7 +31,7 @@ public final class IcyDecoder implements MetadataDecoder {
private
static
final
String
TAG
=
"IcyDecoder"
;
private
static
final
Pattern
METADATA_ELEMENT
=
Pattern
.
compile
(
"(.+?)='(.+?)';"
);
private
static
final
Pattern
METADATA_ELEMENT
=
Pattern
.
compile
(
"(.+?)='(.+?)';"
,
Pattern
.
DOTALL
);
private
static
final
String
STREAM_KEY_NAME
=
"streamtitle"
;
private
static
final
String
STREAM_KEY_URL
=
"streamurl"
;
...
...
library/core/src/test/java/com/google/android/exoplayer2/metadata/icy/IcyDecoderTest.java
View file @
0612d9f6
...
...
@@ -71,6 +71,17 @@ public final class IcyDecoderTest {
}
@Test
public
void
decode_lineTerminatorInTitle
()
{
IcyDecoder
decoder
=
new
IcyDecoder
();
Metadata
metadata
=
decoder
.
decode
(
"StreamTitle='test\r\ntitle';StreamURL='test_url';"
);
assertThat
(
metadata
.
length
()).
isEqualTo
(
1
);
IcyInfo
streamInfo
=
(
IcyInfo
)
metadata
.
get
(
0
);
assertThat
(
streamInfo
.
title
).
isEqualTo
(
"test\r\ntitle"
);
assertThat
(
streamInfo
.
url
).
isEqualTo
(
"test_url"
);
}
@Test
public
void
decode_notIcy
()
{
IcyDecoder
decoder
=
new
IcyDecoder
();
Metadata
metadata
=
decoder
.
decode
(
"NotIcyData"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment