mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Correctly handle zero length fragmentRun.
This commit is contained in:
parent
4fdd68facf
commit
7cb55e23f6
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ public final class FragmentedMp4Extractor implements Extractor {
|
||||||
@Override
|
@Override
|
||||||
public boolean seekTo(long seekTimeUs, boolean allowNoop) {
|
public boolean seekTo(long seekTimeUs, boolean allowNoop) {
|
||||||
pendingSeekTimeMs = (int) (seekTimeUs / 1000);
|
pendingSeekTimeMs = (int) (seekTimeUs / 1000);
|
||||||
if (allowNoop && fragmentRun != null
|
if (allowNoop && fragmentRun != null && fragmentRun.length > 0
|
||||||
&& pendingSeekTimeMs >= fragmentRun.getSamplePresentationTime(0)
|
&& pendingSeekTimeMs >= fragmentRun.getSamplePresentationTime(0)
|
||||||
&& pendingSeekTimeMs <= fragmentRun.getSamplePresentationTime(fragmentRun.length - 1)) {
|
&& pendingSeekTimeMs <= fragmentRun.getSamplePresentationTime(fragmentRun.length - 1)) {
|
||||||
int sampleIndexFound = 0;
|
int sampleIndexFound = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue