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
a697905c
authored
Apr 20, 2020
by
olly
Committed by
Oliver Woodman
May 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix H265Reader to correctly output SEI and AUD NAL units
Issue: #7113 PiperOrigin-RevId: 307380133
parent
190d81f0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/H265Reader.java
RELEASENOTES.md
View file @
a697905c
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
`http://dashif.org/guidelines/trickmode`
) into the same
`TrackGroup`
as
`http://dashif.org/guidelines/trickmode`
) into the same
`TrackGroup`
as
the main adaptation sets to which they refer. Trick play tracks are
the main adaptation sets to which they refer. Trick play tracks are
marked with the
`C.ROLE_FLAG_TRICK_PLAY`
flag.
marked with the
`C.ROLE_FLAG_TRICK_PLAY`
flag.
*
MPEG-TS: Fix issue where SEI NAL units were incorrectly dropped from H.265
samples (
[
#7113
](
https://github.com/google/ExoPlayer/issues/7113
)
).
### 2.11.4 (2020-04-08) ###
### 2.11.4 (2020-04-08) ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/H265Reader.java
View file @
a697905c
...
@@ -41,6 +41,7 @@ public final class H265Reader implements ElementaryStreamReader {
...
@@ -41,6 +41,7 @@ public final class H265Reader implements ElementaryStreamReader {
private
static
final
int
VPS_NUT
=
32
;
private
static
final
int
VPS_NUT
=
32
;
private
static
final
int
SPS_NUT
=
33
;
private
static
final
int
SPS_NUT
=
33
;
private
static
final
int
PPS_NUT
=
34
;
private
static
final
int
PPS_NUT
=
34
;
private
static
final
int
AUD_NUT
=
35
;
private
static
final
int
PREFIX_SEI_NUT
=
39
;
private
static
final
int
PREFIX_SEI_NUT
=
39
;
private
static
final
int
SUFFIX_SEI_NUT
=
40
;
private
static
final
int
SUFFIX_SEI_NUT
=
40
;
...
@@ -445,7 +446,7 @@ public final class H265Reader implements ElementaryStreamReader {
...
@@ -445,7 +446,7 @@ public final class H265Reader implements ElementaryStreamReader {
}
}
}
}
// Look for the flag if this NAL unit contains a slice_segment_layer_rbsp.
// Look for the f
irst slice f
lag if this NAL unit contains a slice_segment_layer_rbsp.
nalUnitHasKeyframeData
=
(
nalUnitType
>=
BLA_W_LP
&&
nalUnitType
<=
CRA_NUT
);
nalUnitHasKeyframeData
=
(
nalUnitType
>=
BLA_W_LP
&&
nalUnitType
<=
CRA_NUT
);
lookingForFirstSliceFlag
=
nalUnitHasKeyframeData
||
nalUnitType
<=
RASL_R
;
lookingForFirstSliceFlag
=
nalUnitHasKeyframeData
||
nalUnitType
<=
RASL_R
;
}
}
...
@@ -489,14 +490,12 @@ public final class H265Reader implements ElementaryStreamReader {
...
@@ -489,14 +490,12 @@ public final class H265Reader implements ElementaryStreamReader {
/** Returns whether a NAL unit type is one that occurs before any VCL NAL units in a sample. */
/** Returns whether a NAL unit type is one that occurs before any VCL NAL units in a sample. */
private
static
boolean
isPrefixNalUnit
(
int
nalUnitType
)
{
private
static
boolean
isPrefixNalUnit
(
int
nalUnitType
)
{
// TODO: Include AUD_NUT and PREFIX_SEI_NUT
return
(
VPS_NUT
<=
nalUnitType
&&
nalUnitType
<=
AUD_NUT
)
||
nalUnitType
==
PREFIX_SEI_NUT
;
return
VPS_NUT
<=
nalUnitType
&&
nalUnitType
<=
PPS_NUT
;
}
}
/** Returns whether a NAL unit type is one that occurs in the VLC body of a sample. */
/** Returns whether a NAL unit type is one that occurs in the VLC body of a sample. */
private
static
boolean
isVclBodyNalUnit
(
int
nalUnitType
)
{
private
static
boolean
isVclBodyNalUnit
(
int
nalUnitType
)
{
// TODO: Include SUFFIX_SEI_NUT
return
nalUnitType
<
VPS_NUT
||
nalUnitType
==
SUFFIX_SEI_NUT
;
return
nalUnitType
<
VPS_NUT
;
}
}
}
}
}
}
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