Commit 34ef9b20 by Will

Add tests for the FlvExtractor seek map. Fix an EOF seeking issue.

parent 1b215736
......@@ -322,6 +322,10 @@ public final class FlvExtractor implements Extractor {
return new SeekMap.Unseekable(durationUs);
}
int keyFrameSize = times.size();
if ((long) (times.get(times.size() - 1) * C.MICROS_PER_SECOND) == durationUs) {
// the last keyframe has no sample data followed (AVC_PACKET_TYPE_END_OF_SEQUENCE)
keyFrameSize = keyFrameSize - 1;
}
int[] sizes = new int[keyFrameSize];
long[] offsets = new long[keyFrameSize];
long[] durationsUs = new long[keyFrameSize];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment