Add end of input fix to H262 reader
This commit is contained in:
parent
45372911b0
commit
550bc5be20
@ -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…
x
Reference in New Issue
Block a user