Commit e1d3c932 by andrewlewis Committed by Oliver Woodman

Only update track streams in updateTrackStreams.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125661172
parent fc2cdef2
......@@ -790,8 +790,9 @@ import java.util.ArrayList;
}
int enabledRendererCount = disableRenderers(false, newTrackSelections);
TrackStream[] newStreams = playingSource.updateTrackStreams(oldStreams, newTrackSelections,
newSelections, playbackInfo.positionUs);
TrackStream[] newStreams = sampleSource.selectTracks(oldStreams, newSelections,
playbackInfo.positionUs);
playingSource.updateTrackStreams(newTrackSelections, newSelections, newStreams);
trackSelector.onSelectionActivated(trackSelectionData);
// Update the stored TrackStreams.
......@@ -989,14 +990,12 @@ import java.util.ArrayList;
}
}
}
updateTrackStreams(oldStreams, newTrackSelections, newSelections, positionUs);
TrackStream[] newStreams = sampleSource.selectTracks(oldStreams, newSelections, positionUs);
updateTrackStreams(newTrackSelections, newSelections, newStreams);
}
public TrackStream[] updateTrackStreams(ArrayList<TrackStream> oldStreams,
TrackSelectionArray newTrackSelections, ArrayList<TrackSelection> newSelections,
long positionUs) {
TrackStream[] newStreams = sampleSource.selectTracks(oldStreams, newSelections,
positionUs);
public void updateTrackStreams(TrackSelectionArray newTrackSelections,
ArrayList<TrackSelection> newSelections, TrackStream[] newStreams) {
hasEnabledTracks = false;
for (int i = 0; i < newTrackSelections.length; i++) {
TrackSelection selection = newTrackSelections.get(i);
......@@ -1013,7 +1012,6 @@ import java.util.ArrayList;
}
}
trackSelections = newTrackSelections;
return newStreams;
}
public void release() {
......
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