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
4e1c4f00
authored
May 22, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Resolution is INTxINT
parent
a60dc580
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
library/src/main/java/com/google/android/exoplayer/hls/HlsPlaylistParser.java
library/src/main/java/com/google/android/exoplayer/hls/HlsPlaylistParser.java
View file @
4e1c4f00
...
@@ -72,7 +72,7 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist>
...
@@ -72,7 +72,7 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist>
private
static
final
Pattern
CODECS_ATTR_REGEX
=
private
static
final
Pattern
CODECS_ATTR_REGEX
=
Pattern
.
compile
(
CODECS_ATTR
+
"=\"(.+?)\""
);
Pattern
.
compile
(
CODECS_ATTR
+
"=\"(.+?)\""
);
private
static
final
Pattern
RESOLUTION_ATTR_REGEX
=
private
static
final
Pattern
RESOLUTION_ATTR_REGEX
=
Pattern
.
compile
(
RESOLUTION_ATTR
+
"=(\\d+
(\\.\\d+)?x\\d+(\\.\\d+)?
)"
);
Pattern
.
compile
(
RESOLUTION_ATTR
+
"=(\\d+
x\\d+
)"
);
private
static
final
Pattern
MEDIA_DURATION_REGEX
=
private
static
final
Pattern
MEDIA_DURATION_REGEX
=
Pattern
.
compile
(
MEDIA_DURATION_TAG
+
":([\\d.]+),"
);
Pattern
.
compile
(
MEDIA_DURATION_TAG
+
":([\\d.]+),"
);
private
static
final
Pattern
MEDIA_SEQUENCE_REGEX
=
private
static
final
Pattern
MEDIA_SEQUENCE_REGEX
=
...
@@ -168,12 +168,12 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist>
...
@@ -168,12 +168,12 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist>
RESOLUTION_ATTR_REGEX
);
RESOLUTION_ATTR_REGEX
);
if
(
resolutionString
!=
null
)
{
if
(
resolutionString
!=
null
)
{
String
[]
widthAndHeight
=
resolutionString
.
split
(
"x"
);
String
[]
widthAndHeight
=
resolutionString
.
split
(
"x"
);
width
=
Math
.
round
(
Float
.
parseFloat
(
widthAndHeight
[
0
])
);
width
=
Integer
.
parseInt
(
widthAndHeight
[
0
]
);
if
(
width
<=
0
)
{
if
(
width
<=
0
)
{
// Width was invalid.
// Width was invalid.
width
=
-
1
;
width
=
-
1
;
}
}
height
=
Math
.
round
(
Float
.
parseFloat
(
widthAndHeight
[
1
])
);
height
=
Integer
.
parseInt
(
widthAndHeight
[
1
]
);
if
(
height
<=
0
)
{
if
(
height
<=
0
)
{
// Height was invalid.
// Height was invalid.
height
=
-
1
;
height
=
-
1
;
...
...
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