Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8da0e27d
authored
Jan 27, 2020
by
olly
Committed by
Oliver Woodman
Jan 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix premature nullness assertions
Issue: #6910 PiperOrigin-RevId: 291721229
parent
4dddad83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java
View file @
8da0e27d
...
...
@@ -560,28 +560,32 @@ 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
||
picParameterSetId
!=
other
.
picParameterSetId
||
fieldPicFlag
!=
other
.
fieldPicFlag
||
(
bottomFieldFlagPresent
&&
other
.
bottomFieldFlagPresent
&&
bottomFieldFlag
!=
other
.
bottomFieldFlag
)
||
(
nalRefIdc
!=
other
.
nalRefIdc
&&
(
nalRefIdc
==
0
||
other
.
nalRefIdc
==
0
))
||
(
spsData
.
picOrderCountType
==
0
&&
otherSpsData
.
picOrderCountType
==
0
&&
(
picOrderCntLsb
!=
other
.
picOrderCntLsb
||
deltaPicOrderCntBottom
!=
other
.
deltaPicOrderCntBottom
))
||
(
spsData
.
picOrderCountType
==
1
&&
otherSpsData
.
picOrderCountType
==
1
&&
(
deltaPicOrderCnt0
!=
other
.
deltaPicOrderCnt0
||
deltaPicOrderCnt1
!=
other
.
deltaPicOrderCnt1
))
||
idrPicFlag
!=
other
.
idrPicFlag
||
(
idrPicFlag
&&
idrPicId
!=
other
.
idrPicId
));
return
frameNum
!=
other
.
frameNum
||
picParameterSetId
!=
other
.
picParameterSetId
||
fieldPicFlag
!=
other
.
fieldPicFlag
||
(
bottomFieldFlagPresent
&&
other
.
bottomFieldFlagPresent
&&
bottomFieldFlag
!=
other
.
bottomFieldFlag
)
||
(
nalRefIdc
!=
other
.
nalRefIdc
&&
(
nalRefIdc
==
0
||
other
.
nalRefIdc
==
0
))
||
(
spsData
.
picOrderCountType
==
0
&&
otherSpsData
.
picOrderCountType
==
0
&&
(
picOrderCntLsb
!=
other
.
picOrderCntLsb
||
deltaPicOrderCntBottom
!=
other
.
deltaPicOrderCntBottom
))
||
(
spsData
.
picOrderCountType
==
1
&&
otherSpsData
.
picOrderCountType
==
1
&&
(
deltaPicOrderCnt0
!=
other
.
deltaPicOrderCnt0
||
deltaPicOrderCnt1
!=
other
.
deltaPicOrderCnt1
))
||
idrPicFlag
!=
other
.
idrPicFlag
||
(
idrPicFlag
&&
idrPicId
!=
other
.
idrPicId
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment