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
495347d3
authored
Dec 03, 2020
by
Oliver Woodman
Committed by
Ian Baker
Jan 08, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Merge pull request #8215 from TiVo:p-fix-apple-iframe-bug
PiperOrigin-RevId: 345202157
parent
eb38a63e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/BundledHlsMediaChunkExtractor.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunk.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunkExtractor.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/BundledHlsMediaChunkExtractor.java
View file @
495347d3
...
@@ -101,4 +101,9 @@ public final class BundledHlsMediaChunkExtractor implements HlsMediaChunkExtract
...
@@ -101,4 +101,9 @@ public final class BundledHlsMediaChunkExtractor implements HlsMediaChunkExtract
return
new
BundledHlsMediaChunkExtractor
(
return
new
BundledHlsMediaChunkExtractor
(
newExtractorInstance
,
masterPlaylistFormat
,
timestampAdjuster
);
newExtractorInstance
,
masterPlaylistFormat
,
timestampAdjuster
);
}
}
@Override
public
void
onTruncatedSegmentParsed
()
{
extractor
.
seek
(
/* position= */
0
,
/* timeUs= */
0
);
}
}
}
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunk.java
View file @
495347d3
...
@@ -403,6 +403,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
...
@@ -403,6 +403,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
}
}
try
{
try
{
while
(!
loadCanceled
&&
extractor
.
read
(
input
))
{}
while
(!
loadCanceled
&&
extractor
.
read
(
input
))
{}
}
catch
(
EOFException
e
)
{
if
((
trackFormat
.
roleFlags
&
C
.
ROLE_FLAG_TRICK_PLAY
)
!=
0
)
{
// See onTruncatedSegmentParsed's javadoc for more info on why we are swallowing the EOF
// exception for trick play tracks.
extractor
.
onTruncatedSegmentParsed
();
}
else
{
throw
e
;
}
}
finally
{
}
finally
{
nextLoadPosition
=
(
int
)
(
input
.
getPosition
()
-
dataSpec
.
position
);
nextLoadPosition
=
(
int
)
(
input
.
getPosition
()
-
dataSpec
.
position
);
}
}
...
...
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunkExtractor.java
View file @
495347d3
...
@@ -59,4 +59,15 @@ public interface HlsMediaChunkExtractor {
...
@@ -59,4 +59,15 @@ public interface HlsMediaChunkExtractor {
* instances that are not {@link #isReusable() reusable}.
* instances that are not {@link #isReusable() reusable}.
*/
*/
HlsMediaChunkExtractor
recreate
();
HlsMediaChunkExtractor
recreate
();
/**
* Resets the sample parsing state.
*
* <p>Resetting the parsing state allows support for Fragmented MP4 EXT-X-I-FRAME-STREAM-INF
* segments. EXT-X-I-FRAME-STREAM-INF segments are truncated to include only a leading key frame.
* After parsing said keyframe, an extractor may reach an unexpected end of file. By resetting its
* state, we can continue feeding samples from the following segments to the extractor. See <a
* href="https://github.com/google/ExoPlayer/issues/7512">#7512</a> for context.
*/
void
onTruncatedSegmentParsed
();
}
}
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