mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Avoid duplicated samples with at H265 ts end
This commit is contained in:
parent
4015db57a5
commit
8253530688
@ -394,8 +394,10 @@ public final class H265Reader implements ElementaryStreamReader {
|
||||
|
||||
public void end(long position) {
|
||||
sampleIsKeyframe = nalUnitHasKeyframeData;
|
||||
if (nalUnitTimeUs != sampleTimeUs) {
|
||||
// Output a sample with the NAL units since the current nalUnitPosition
|
||||
outputSample(/* offset= */ (int) (position - nalUnitPosition));
|
||||
}
|
||||
// Output a final sample with the remaining NAL units up to the passed position
|
||||
samplePosition = nalUnitPosition;
|
||||
nalUnitPosition = position;
|
||||
|
Loading…
x
Reference in New Issue
Block a user