Commit f2c51560 by tonihei Committed by kim-vde

Don't assume FakeSampleStream is ended without end of stream signal

PiperOrigin-RevId: 333029935
parent cef3e3ca
......@@ -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);
}
}
/**
......
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