mirror of
https://github.com/androidx/media.git
synced 2025-05-11 01:31:40 +08:00
Reset some state values when a session is finished.
Currently, we keep the values for dropped/played frames, audio underruns and current formats from the last session, causing double reporting of counters and wrong track change reasons for formats. All these values should be reset when the active session is finished, so that the new session can start from scratch. PiperOrigin-RevId: 422798406
This commit is contained in:
parent
491ac8f066
commit
24e77a3393
@ -594,6 +594,12 @@ public final class MediaMetricsListener
|
||||
playbackSession.reportPlaybackMetrics(metricsBuilder.build());
|
||||
metricsBuilder = null;
|
||||
activeSessionId = null;
|
||||
audioUnderruns = 0;
|
||||
droppedFrames = 0;
|
||||
playedFrames = 0;
|
||||
currentVideoFormat = null;
|
||||
currentAudioFormat = null;
|
||||
currentTextFormat = null;
|
||||
}
|
||||
|
||||
private static int getTrackChangeReason(@C.SelectionReason int trackSelectionReason) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user