Fix unrealistic FakeSampleStream.isReady

The FakeSampleStream is currently always ready even if it doesn't
have any samples to read. Fix that by checking for the conditions
under which read() will be successful.

PiperOrigin-RevId: 301371031
This commit is contained in:
tonihei 2020-03-17 14:39:56 +00:00 committed by Oliver Woodman
parent cb414e8743
commit 71eec8ead1

View file

@ -164,7 +164,7 @@ public final class FakeSampleStream implements SampleStream {
@Override
public boolean isReady() {
return true;
return !readFormat || readEOSBuffer || !fakeSampleStreamItems.isEmpty();
}
@Override