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,28 +560,32 @@ public final class H264Reader implements ElementaryStreamReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isFirstVclNalUnitOfPicture(SliceHeaderData other) {
|
private boolean isFirstVclNalUnitOfPicture(SliceHeaderData other) {
|
||||||
|
if (!isComplete) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!other.isComplete) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// See ISO 14496-10 subsection 7.4.1.2.4.
|
// See ISO 14496-10 subsection 7.4.1.2.4.
|
||||||
SpsData spsData = Assertions.checkStateNotNull(this.spsData);
|
SpsData spsData = Assertions.checkStateNotNull(this.spsData);
|
||||||
SpsData otherSpsData = Assertions.checkStateNotNull(other.spsData);
|
SpsData otherSpsData = Assertions.checkStateNotNull(other.spsData);
|
||||||
return isComplete
|
return frameNum != other.frameNum
|
||||||
&& (!other.isComplete
|
|| picParameterSetId != other.picParameterSetId
|
||||||
|| frameNum != other.frameNum
|
|| fieldPicFlag != other.fieldPicFlag
|
||||||
|| picParameterSetId != other.picParameterSetId
|
|| (bottomFieldFlagPresent
|
||||||
|| fieldPicFlag != other.fieldPicFlag
|
&& other.bottomFieldFlagPresent
|
||||||
|| (bottomFieldFlagPresent
|
&& bottomFieldFlag != other.bottomFieldFlag)
|
||||||
&& other.bottomFieldFlagPresent
|
|| (nalRefIdc != other.nalRefIdc && (nalRefIdc == 0 || other.nalRefIdc == 0))
|
||||||
&& bottomFieldFlag != other.bottomFieldFlag)
|
|| (spsData.picOrderCountType == 0
|
||||||
|| (nalRefIdc != other.nalRefIdc && (nalRefIdc == 0 || other.nalRefIdc == 0))
|
&& otherSpsData.picOrderCountType == 0
|
||||||
|| (spsData.picOrderCountType == 0
|
&& (picOrderCntLsb != other.picOrderCntLsb
|
||||||
&& otherSpsData.picOrderCountType == 0
|
|| deltaPicOrderCntBottom != other.deltaPicOrderCntBottom))
|
||||||
&& (picOrderCntLsb != other.picOrderCntLsb
|
|| (spsData.picOrderCountType == 1
|
||||||
|| deltaPicOrderCntBottom != other.deltaPicOrderCntBottom))
|
&& otherSpsData.picOrderCountType == 1
|
||||||
|| (spsData.picOrderCountType == 1
|
&& (deltaPicOrderCnt0 != other.deltaPicOrderCnt0
|
||||||
&& otherSpsData.picOrderCountType == 1
|
|| deltaPicOrderCnt1 != other.deltaPicOrderCnt1))
|
||||||
&& (deltaPicOrderCnt0 != other.deltaPicOrderCnt0
|
|| idrPicFlag != other.idrPicFlag
|
||||||
|| deltaPicOrderCnt1 != other.deltaPicOrderCnt1))
|
|| (idrPicFlag && idrPicId != other.idrPicId);
|
||||||
|| idrPicFlag != other.idrPicFlag
|
|
||||||
|| (idrPicFlag && idrPicId != other.idrPicId));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue