mirror of
https://github.com/samsonjs/media.git
synced 2026-04-02 10:45:51 +00:00
Pragmatic fix for "stuck-in-ready-state" when seeking near the
end of some streams.
This commit is contained in:
parent
066334dad7
commit
d1360ad7d2
1 changed files with 3 additions and 1 deletions
|
|
@ -479,7 +479,9 @@ public final class AudioTrack {
|
|||
|
||||
/** Returns whether enough data has been supplied via {@link #handleBuffer} to begin playback. */
|
||||
public boolean hasEnoughDataToBeginPlayback() {
|
||||
return submittedBytes >= minBufferSize;
|
||||
// The value of minBufferSize can be slightly less than what's actually required for playback
|
||||
// to start, hence the multiplication factor.
|
||||
return submittedBytes > (minBufferSize * 3) / 2;
|
||||
}
|
||||
|
||||
/** Sets the playback volume. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue