Automated rollback
*** Reason for rollback *** Referential equality was probably the right thing to do, since using .equals breaks track selection in the case that a source exposes two or more tracks whose formats are equal. We should fix the way overrides work instead. *** Original change description *** Fix multi-period transitions with track selection overrides An override applies across periods provided they expose the same track groups according to .equals, but the formats in the override are then compared against the period's formats according to ==. Use .equals consistently to fix. *** ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130083840
This commit is contained in:
parent
1811b01b07
commit
cc28aeadd8
@ -67,7 +67,7 @@ public final class TrackGroup {
|
|||||||
*/
|
*/
|
||||||
public int indexOf(Format format) {
|
public int indexOf(Format format) {
|
||||||
for (int i = 0; i < formats.length; i++) {
|
for (int i = 0; i < formats.length; i++) {
|
||||||
if (formats[i].equals(format)) {
|
if (format == formats[i]) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public final class TrackGroupArray {
|
|||||||
*/
|
*/
|
||||||
public int indexOf(TrackGroup group) {
|
public int indexOf(TrackGroup group) {
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
if (trackGroups[i].equals(group)) {
|
if (trackGroups[i] == group) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ public abstract class BaseTrackSelection implements TrackSelection {
|
|||||||
@Override
|
@Override
|
||||||
public final int indexOf(Format format) {
|
public final int indexOf(Format format) {
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
if (formats[i].equals(format)) {
|
if (formats[i] == format) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user