mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix premature nullness assertions
Issue: #6910 PiperOrigin-RevId: 291721229
This commit is contained in:
parent
4dddad831a
commit
8da0e27d2e
1 changed files with 23 additions and 19 deletions
|
|
@ -560,12 +560,16 @@ public final class H264Reader implements ElementaryStreamReader {
|
|||
}
|
||||
|
||||
private boolean isFirstVclNalUnitOfPicture(SliceHeaderData other) {
|
||||
if (!isComplete) {
|
||||
return false;
|
||||
}
|
||||
if (!other.isComplete) {
|
||||
return true;
|
||||
}
|
||||
// See ISO 14496-10 subsection 7.4.1.2.4.
|
||||
SpsData spsData = Assertions.checkStateNotNull(this.spsData);
|
||||
SpsData otherSpsData = Assertions.checkStateNotNull(other.spsData);
|
||||
return isComplete
|
||||
&& (!other.isComplete
|
||||
|| frameNum != other.frameNum
|
||||
return frameNum != other.frameNum
|
||||
|| picParameterSetId != other.picParameterSetId
|
||||
|| fieldPicFlag != other.fieldPicFlag
|
||||
|| (bottomFieldFlagPresent
|
||||
|
|
@ -581,7 +585,7 @@ public final class H264Reader implements ElementaryStreamReader {
|
|||
&& (deltaPicOrderCnt0 != other.deltaPicOrderCnt0
|
||||
|| deltaPicOrderCnt1 != other.deltaPicOrderCnt1))
|
||||
|| idrPicFlag != other.idrPicFlag
|
||||
|| (idrPicFlag && idrPicId != other.idrPicId));
|
||||
|| (idrPicFlag && idrPicId != other.idrPicId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue