mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00: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
d15350ab01
commit
b2ecce4d07
1 changed files with 6 additions and 0 deletions
|
|
@ -592,6 +592,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…
Reference in a new issue