From 4faed59cb86fb763c150c700b0795f2ac61fd111 Mon Sep 17 00:00:00 2001 From: tonihei <tonihei@google.com> Date: Mon, 11 Dec 2023 14:36:59 +0000 Subject: [PATCH] Formatting fixes and release notes --- RELEASENOTES.md | 2 ++ .../main/java/androidx/media3/extractor/ts/H264Reader.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 62a0143a876..5e9ea278126 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -50,6 +50,8 @@ `ColorInfo.colorSpace`, `ColorInfo.colorTransfer`, and `ColorInfo.colorRange` values ([#692](https://github.com/androidx/media/pull/692)). + * Fix wrong keyframe detection for TS H264 streams + ([#864](https://github.com/androidx/media/pull/864)). * Audio: * Video: * Add workaround for a device issue on Galaxy Tab S7 FE, Chromecast with diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/ts/H264Reader.java b/libraries/extractor/src/main/java/androidx/media3/extractor/ts/H264Reader.java index 99ad187b05d..07786a4ba5e 100644 --- a/libraries/extractor/src/main/java/androidx/media3/extractor/ts/H264Reader.java +++ b/libraries/extractor/src/main/java/androidx/media3/extractor/ts/H264Reader.java @@ -330,11 +330,12 @@ public void reset() { sliceHeader.clear(); } - public void startNalUnit(long position, int type, long pesTimeUs, boolean rai) { + public void startNalUnit( + long position, int type, long pesTimeUs, boolean randomAccessIndicator) { nalUnitType = type; nalUnitTimeUs = pesTimeUs; nalUnitStartPosition = position; - randomAccessIndicator = rai; + this.randomAccessIndicator = randomAccessIndicator; if ((allowNonIdrKeyframes && nalUnitType == NalUnitUtil.NAL_UNIT_TYPE_NON_IDR) || (detectAccessUnits && (nalUnitType == NalUnitUtil.NAL_UNIT_TYPE_IDR