-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException when drainToEndOfStream when in tunneling mode #10847
Comments
Do you have any custom |
No this should be reproducible in the ExoPlayer reference application - we have not added a custom |
I just checked the emails, but can't see anything related to this issue. Could you make sure to use "Issue #10847" in the subject line? Otherwise the email may get lost in some filters. |
I've resent the email |
Thanks! It again wasn't forwarded by our filters, but I was able to dig it out regardless. (Need to investigate what's going on there, but yours seem to be the only "correct" email that wasn't forwarded to us). |
It looks like your stream may cause this issue because it requires gapless trimming. This enables an |
When audio processors are enabled during tunneling, they must produce output immediately, ensuring that the timestamps of the output samples correspond to the input and that no additional samples are produced. This requirement is documented in the Javadoc of DefaultAudioSink. However, this alone doesn't guarantee all buffers are immediately written to the AudioTrack, because the AudioTrack writes are non-blocking and may need multiple attempts. When draining the audio sink at the end of the stream, we currently fail in this situation because we assert that the timestamp must be set (=the drain operation is a no-op). But this may not be true when the previous non-blocking write wasn't fully handled. We can fix this by saving the last timestamp and reusing it during draining. Issue: #10847 PiperOrigin-RevId: 500943891
When audio processors are enabled during tunneling, they must produce output immediately, ensuring that the timestamps of the output samples correspond to the input and that no additional samples are produced. This requirement is documented in the Javadoc of DefaultAudioSink. However, this alone doesn't guarantee all buffers are immediately written to the AudioTrack, because the AudioTrack writes are non-blocking and may need multiple attempts. When draining the audio sink at the end of the stream, we currently fail in this situation because we assert that the timestamp must be set (=the drain operation is a no-op). But this may not be true when the previous non-blocking write wasn't fully handled. We can fix this by saving the last timestamp and reusing it during draining. Issue: google/ExoPlayer#10847 PiperOrigin-RevId: 500943891
The problem is likely fixed by the commit above. |
ExoPlayer Version
2.18.2
Devices that reproduce the issue
Model: TalkTalk STB
Os: Android
Version: 10
Devices that do not reproduce the issue
Fire TV Stick (2nd Gen) running Fire OS 5.2.9.2 (Tunneling was not enabled for this media, tried other media with tunneling enabled but the issue was not present)
Reproducible in the demo app?
Yes
Reproduction steps
Turn on tunneling ie in PlayerActivity:
As our media is over http you will need to allow clear text, so in an xml file in res/xml:
And in the android manifest of the demo app tag:
Play the video to the end, where the crash should occur.
Expected result
The audio sink should be released successfully
Actual result
The following exception is thown:
Media
Media Url is sent via email
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: