This commit is contained in:
Daniele Sparano 2025-02-20 15:16:36 +00:00 committed by tonihei
parent d81321174e
commit da360a67cb

View File

@ -171,9 +171,14 @@ public final class PesReader implements TsPayloadReader {
// pes does not have a length field and body is being read, another exclusion
// is due to H262 streams possibly having, in HLS mode, a pes across more than one segment
// which would trigger committing an unfinished sample in the middle of the access unit
// Only call parseHeader ifIsModeHls is true and can parse header
// some hls may contain broken packages
boolean headerParsed = !isModeHls || parseHeader();
return state == STATE_READING_BODY
&& payloadSize == C.LENGTH_UNSET
&& !(isModeHls && reader instanceof H262Reader);
&& !(isModeHls && reader instanceof H262Reader)
&& headerParsed;
}
private void setState(int state) {