mirror of
https://github.com/samsonjs/media.git
synced 2026-04-04 11:05:47 +00:00
Add end of input fix to H262 reader
This commit is contained in:
parent
45372911b0
commit
550bc5be20
2 changed files with 7 additions and 2 deletions
|
|
@ -218,7 +218,11 @@ public final class H262Reader implements ElementaryStreamReader {
|
|||
|
||||
@Override
|
||||
public void packetFinished(boolean isEndOfInput) {
|
||||
// Do nothing.
|
||||
if (isEndOfInput) {
|
||||
@C.BufferFlags int flags = sampleIsKeyframe ? C.BUFFER_FLAG_KEY_FRAME : 0;
|
||||
int size = (int) (totalBytesWritten - samplePosition);
|
||||
output.sampleMetadata(sampleTimeUs, flags, size, 0, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -331,7 +331,8 @@ public final class TsExtractor implements Extractor {
|
|||
payloadReader.consume(new ParsableByteArray(), FLAG_PAYLOAD_UNIT_START_INDICATOR);
|
||||
}
|
||||
}
|
||||
} return RESULT_END_OF_INPUT;
|
||||
}
|
||||
return RESULT_END_OF_INPUT;
|
||||
}
|
||||
|
||||
int endOfPacket = findEndOfFirstTsPacketInBuffer();
|
||||
|
|
|
|||
Loading…
Reference in a new issue