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
d6152dc3
authored
Aug 11, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use MediaFormat.language in hashCode and equals.
parent
7d306ae5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
library/src/main/java/com/google/android/exoplayer/MediaFormat.java
library/src/main/java/com/google/android/exoplayer/MediaFormat.java
View file @
d6152dc3
...
@@ -171,8 +171,8 @@ public final class MediaFormat {
...
@@ -171,8 +171,8 @@ public final class MediaFormat {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"MediaFormat("
+
mimeType
+
", "
+
maxInputSize
+
", "
+
width
+
", "
+
height
+
", "
return
"MediaFormat("
+
mimeType
+
", "
+
maxInputSize
+
", "
+
width
+
", "
+
height
+
", "
+
pixelWidthHeightRatio
+
", "
+
channelCount
+
", "
+
sampleRate
+
", "
+
durationUs
+
", "
+
pixelWidthHeightRatio
+
", "
+
channelCount
+
", "
+
sampleRate
+
", "
+
language
+
", "
+
maxWidth
+
", "
+
maxHeight
+
")"
;
+
durationUs
+
", "
+
maxWidth
+
", "
+
maxHeight
+
")"
;
}
}
@Override
@Override
...
@@ -189,6 +189,7 @@ public final class MediaFormat {
...
@@ -189,6 +189,7 @@ public final class MediaFormat {
result
=
31
*
result
+
maxHeight
;
result
=
31
*
result
+
maxHeight
;
result
=
31
*
result
+
channelCount
;
result
=
31
*
result
+
channelCount
;
result
=
31
*
result
+
sampleRate
;
result
=
31
*
result
+
sampleRate
;
result
=
31
*
result
+
(
language
==
null
?
0
:
language
.
hashCode
());
for
(
int
i
=
0
;
i
<
initializationData
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
initializationData
.
size
();
i
++)
{
result
=
31
*
result
+
Arrays
.
hashCode
(
initializationData
.
get
(
i
));
result
=
31
*
result
+
Arrays
.
hashCode
(
initializationData
.
get
(
i
));
}
}
...
@@ -223,7 +224,7 @@ public final class MediaFormat {
...
@@ -223,7 +224,7 @@ public final class MediaFormat {
||
pixelWidthHeightRatio
!=
other
.
pixelWidthHeightRatio
||
pixelWidthHeightRatio
!=
other
.
pixelWidthHeightRatio
||
(!
ignoreMaxDimensions
&&
(
maxWidth
!=
other
.
maxWidth
||
maxHeight
!=
other
.
maxHeight
))
||
(!
ignoreMaxDimensions
&&
(
maxWidth
!=
other
.
maxWidth
||
maxHeight
!=
other
.
maxHeight
))
||
channelCount
!=
other
.
channelCount
||
sampleRate
!=
other
.
sampleRate
||
channelCount
!=
other
.
channelCount
||
sampleRate
!=
other
.
sampleRate
||
!
Util
.
areEqual
(
mimeType
,
other
.
mimeType
)
||
!
Util
.
areEqual
(
language
,
other
.
language
)
||
!
Util
.
areEqual
(
mimeType
,
other
.
mimeType
)
||
initializationData
.
size
()
!=
other
.
initializationData
.
size
())
{
||
initializationData
.
size
()
!=
other
.
initializationData
.
size
())
{
return
false
;
return
false
;
}
}
...
...
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