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