https://github.com/google/ExoPlayer
Revision 38639e5a5f3b30dc032af5bf2325383df71700ce authored by tonihei on 27 February 2023, 12:04:59 UTC, committed by tonihei on 28 February 2023, 18:05:48 UTC
MediaCodecRenderer currently has two independent paths to trigger
events at stream changes:
 1. Detection of the last output buffer of the old stream to trigger
    onProcessedStreamChange and setting the new output stream offset.
 2. Detection of the first input buffer of the new stream to trigger
    onOutputFormatChanged.
Both events are identical for most media. However, there are two
problematic cases:
  A. (1) happens after (2). This may happen if the declared media
     duration is shorter than the actual last sample timestamp.
  B. (2) is too late and there are output samples between (1) and (2).
     This can happen if the new media outputs samples with a timestamp
     less than the first input timestamp.

This can be made more robust by:
 - Keeping a separate formatQueue for each stream to avoid case A.
 - Force outputting the first format after a stream change to
   avoid case B.

Issue: google/ExoPlayer#8594

#minor-release

PiperOrigin-RevId: 512586838
(cherry picked from commit a02c8d855c8eae8cb3132365548ecf7a0730815b)
1 parent 095a0b5
History
Tip revision: 38639e5a5f3b30dc032af5bf2325383df71700ce authored by tonihei on 27 February 2023, 12:04:59 UTC
Ensure output format is updated in sync with stream changes.
Tip revision: 38639e5
File Mode Size
.github
.idea
demos
docs
extensions
gradle
library
playbacktests
robolectricutils
testdata
testutils
.gitignore -rw-r--r-- 1.1 KB
CONTRIBUTING.md -rw-r--r-- 1.6 KB
LICENSE -rw-r--r-- 11.1 KB
README.md -rw-r--r-- 5.1 KB
RELEASENOTES.md -rw-r--r-- 256.5 KB
SECURITY.md -rw-r--r-- 453 bytes
build.gradle -rw-r--r-- 1.2 KB
common_library_config.gradle -rw-r--r-- 1.4 KB
constants.gradle -rw-r--r-- 2.5 KB
core_settings.gradle -rw-r--r-- 4.9 KB
gradle.properties -rw-r--r-- 271 bytes
gradlew -rwxr-xr-x 7.9 KB
gradlew.bat -rw-r--r-- 2.7 KB
javadoc_combined.gradle -rw-r--r-- 7.4 KB
javadoc_library.gradle -rw-r--r-- 1.9 KB
javadoc_util.gradle -rw-r--r-- 2.5 KB
media3-migration.sh -rw-r--r-- 17.1 KB
missing_aar_type_workaround.gradle -rw-r--r-- 4.0 KB
publish.gradle -rw-r--r-- 2.3 KB
settings.gradle -rw-r--r-- 1.5 KB

README.md

back to top