Commit ebfeb2f7 by tonihei Committed by kim-vde
parent f2c51560
...@@ -190,13 +190,14 @@ public class FakeSampleStream implements SampleStream { ...@@ -190,13 +190,14 @@ public class FakeSampleStream implements SampleStream {
} }
} }
sampleItemIndex = fakeSampleStreamItems.size(); sampleItemIndex = fakeSampleStreamItems.size();
if (!fakeSampleStreamItems.isEmpty()) { @Nullable
FakeSampleStreamItem lastItem = Iterables.getLast(fakeSampleStreamItems); FakeSampleStreamItem lastItem =
Iterables.getLast(fakeSampleStreamItems, /* defaultValue= */ null);
readEOSBuffer = readEOSBuffer =
lastItem.sampleInfo != null lastItem != null
&& lastItem.sampleInfo != null
&& ((lastItem.sampleInfo.flags & C.BUFFER_FLAG_END_OF_STREAM) != 0); && ((lastItem.sampleInfo.flags & C.BUFFER_FLAG_END_OF_STREAM) != 0);
} }
}
/** /**
* Adds an item to the end of the queue of {@link FakeSampleStreamItem items}. * Adds an item to the end of the queue of {@link FakeSampleStreamItem items}.
......
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