mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Don't assume FakeSampleStream is ended without end of stream signal
PiperOrigin-RevId: 333029935
This commit is contained in:
parent
a837e7a3b0
commit
6a9f125c14
1 changed files with 6 additions and 1 deletions
|
|
@ -190,7 +190,12 @@ public class FakeSampleStream implements SampleStream {
|
|||
}
|
||||
}
|
||||
sampleItemIndex = fakeSampleStreamItems.size();
|
||||
readEOSBuffer = true;
|
||||
if (!fakeSampleStreamItems.isEmpty()) {
|
||||
FakeSampleStreamItem lastItem = Iterables.getLast(fakeSampleStreamItems);
|
||||
readEOSBuffer =
|
||||
lastItem.sampleInfo != null
|
||||
&& ((lastItem.sampleInfo.flags & C.BUFFER_FLAG_END_OF_STREAM) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue