Commit cc28aead by olly Committed by Oliver Woodman

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
parent 1811b01b
......@@ -67,7 +67,7 @@ public final class TrackGroup {
*/
public int indexOf(Format format) {
for (int i = 0; i < formats.length; i++) {
if (formats[i].equals(format)) {
if (format == formats[i]) {
return i;
}
}
......
......@@ -58,7 +58,7 @@ public final class TrackGroupArray {
*/
public int indexOf(TrackGroup group) {
for (int i = 0; i < length; i++) {
if (trackGroups[i].equals(group)) {
if (trackGroups[i] == group) {
return i;
}
}
......
......@@ -100,7 +100,7 @@ public abstract class BaseTrackSelection implements TrackSelection {
@Override
public final int indexOf(Format format) {
for (int i = 0; i < length; i++) {
if (formats[i].equals(format)) {
if (formats[i] == format) {
return i;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment