mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add fix from https://github.com/androidx/media/pull/2172
This commit is contained in:
parent
d81321174e
commit
da360a67cb
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user