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
c828d9b0
authored
Jan 17, 2017
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Some ID3 bug fixes
parent
48099ee5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
demo/src/main/java/com/google/android/exoplayer2/demo/EventLogger.java
library/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java
demo/src/main/java/com/google/android/exoplayer2/demo/EventLogger.java
View file @
c828d9b0
...
@@ -35,6 +35,7 @@ import com.google.android.exoplayer2.metadata.id3.GeobFrame;
...
@@ -35,6 +35,7 @@ import com.google.android.exoplayer2.metadata.id3.GeobFrame;
import
com.google.android.exoplayer2.metadata.id3.Id3Frame
;
import
com.google.android.exoplayer2.metadata.id3.Id3Frame
;
import
com.google.android.exoplayer2.metadata.id3.PrivFrame
;
import
com.google.android.exoplayer2.metadata.id3.PrivFrame
;
import
com.google.android.exoplayer2.metadata.id3.TextInformationFrame
;
import
com.google.android.exoplayer2.metadata.id3.TextInformationFrame
;
import
com.google.android.exoplayer2.metadata.id3.UrlLinkFrame
;
import
com.google.android.exoplayer2.source.AdaptiveMediaSourceEventListener
;
import
com.google.android.exoplayer2.source.AdaptiveMediaSourceEventListener
;
import
com.google.android.exoplayer2.source.ExtractorMediaSource
;
import
com.google.android.exoplayer2.source.ExtractorMediaSource
;
import
com.google.android.exoplayer2.source.TrackGroup
;
import
com.google.android.exoplayer2.source.TrackGroup
;
...
@@ -362,6 +363,9 @@ import java.util.Locale;
...
@@ -362,6 +363,9 @@ import java.util.Locale;
TextInformationFrame
textInformationFrame
=
(
TextInformationFrame
)
entry
;
TextInformationFrame
textInformationFrame
=
(
TextInformationFrame
)
entry
;
Log
.
d
(
TAG
,
prefix
+
String
.
format
(
"%s: value=%s"
,
textInformationFrame
.
id
,
Log
.
d
(
TAG
,
prefix
+
String
.
format
(
"%s: value=%s"
,
textInformationFrame
.
id
,
textInformationFrame
.
value
));
textInformationFrame
.
value
));
}
else
if
(
entry
instanceof
UrlLinkFrame
)
{
UrlLinkFrame
urlLinkFrame
=
(
UrlLinkFrame
)
entry
;
Log
.
d
(
TAG
,
prefix
+
String
.
format
(
"%s: url=%s"
,
urlLinkFrame
.
id
,
urlLinkFrame
.
url
));
}
else
if
(
entry
instanceof
PrivFrame
)
{
}
else
if
(
entry
instanceof
PrivFrame
)
{
PrivFrame
privFrame
=
(
PrivFrame
)
entry
;
PrivFrame
privFrame
=
(
PrivFrame
)
entry
;
Log
.
d
(
TAG
,
prefix
+
String
.
format
(
"%s: owner=%s"
,
privFrame
.
id
,
privFrame
.
owner
));
Log
.
d
(
TAG
,
prefix
+
String
.
format
(
"%s: owner=%s"
,
privFrame
.
id
,
privFrame
.
owner
));
...
@@ -375,7 +379,7 @@ import java.util.Locale;
...
@@ -375,7 +379,7 @@ import java.util.Locale;
apicFrame
.
id
,
apicFrame
.
mimeType
,
apicFrame
.
description
));
apicFrame
.
id
,
apicFrame
.
mimeType
,
apicFrame
.
description
));
}
else
if
(
entry
instanceof
CommentFrame
)
{
}
else
if
(
entry
instanceof
CommentFrame
)
{
CommentFrame
commentFrame
=
(
CommentFrame
)
entry
;
CommentFrame
commentFrame
=
(
CommentFrame
)
entry
;
Log
.
d
(
TAG
,
prefix
+
String
.
format
(
"%s: language=%s description=%s"
,
commentFrame
.
id
,
Log
.
d
(
TAG
,
prefix
+
String
.
format
(
"%s: language=%s
,
description=%s"
,
commentFrame
.
id
,
commentFrame
.
language
,
commentFrame
.
description
));
commentFrame
.
language
,
commentFrame
.
description
));
}
else
if
(
entry
instanceof
Id3Frame
)
{
}
else
if
(
entry
instanceof
Id3Frame
)
{
Id3Frame
id3Frame
=
(
Id3Frame
)
entry
;
Id3Frame
id3Frame
=
(
Id3Frame
)
entry
;
...
...
library/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java
View file @
c828d9b0
...
@@ -382,7 +382,7 @@ public final class Id3Decoder implements MetadataDecoder {
...
@@ -382,7 +382,7 @@ public final class Id3Decoder implements MetadataDecoder {
String
url
;
String
url
;
int
urlStartIndex
=
descriptionEndIndex
+
delimiterLength
(
encoding
);
int
urlStartIndex
=
descriptionEndIndex
+
delimiterLength
(
encoding
);
if
(
urlStartIndex
<
data
.
length
)
{
if
(
urlStartIndex
<
data
.
length
)
{
int
urlEndIndex
=
indexOfZeroByte
(
data
,
0
);
int
urlEndIndex
=
indexOfZeroByte
(
data
,
urlStartIndex
);
url
=
new
String
(
data
,
urlStartIndex
,
urlEndIndex
-
urlStartIndex
,
"ISO-8859-1"
);
url
=
new
String
(
data
,
urlStartIndex
,
urlEndIndex
-
urlStartIndex
,
"ISO-8859-1"
);
}
else
{
}
else
{
url
=
""
;
url
=
""
;
...
@@ -521,10 +521,10 @@ public final class Id3Decoder implements MetadataDecoder {
...
@@ -521,10 +521,10 @@ public final class Id3Decoder implements MetadataDecoder {
"ISO-8859-1"
);
"ISO-8859-1"
);
id3Data
.
setPosition
(
chapterIdEndIndex
+
1
);
id3Data
.
setPosition
(
chapterIdEndIndex
+
1
);
int
startTime
=
id3Data
.
read
UnsignedByte
();
int
startTime
=
id3Data
.
read
Int
();
int
endTime
=
id3Data
.
read
UnsignedByte
();
int
endTime
=
id3Data
.
read
Int
();
int
startOffset
=
id3Data
.
read
UnsignedByte
();
int
startOffset
=
id3Data
.
read
Int
();
int
endOffset
=
id3Data
.
read
UnsignedByte
();
int
endOffset
=
id3Data
.
read
Int
();
ArrayList
<
Id3Frame
>
subFrames
=
new
ArrayList
<>();
ArrayList
<
Id3Frame
>
subFrames
=
new
ArrayList
<>();
int
limit
=
framePosition
+
frameSize
;
int
limit
=
framePosition
+
frameSize
;
...
...
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