-
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
Video playback freezes after closed captions track change #8203
Comments
I get a 404 when opening the link you sent by email. Could you please send a new link and update this issue when you have done it? |
I have updated the link. |
I can see this issue as well after upgrading from 2.11.5 to 2.12.1. The issue is only noticed when actually using a ffmpeg audio track and then switching text track. If I were to play a stream which is supported by my device (and ffmpeg is not needed) I do not see this issue. |
Is this issue being looked at? It really makes an upgrade impossible. |
Yes. This is a fairly obscure issue where As a workaround, you can implement an |
I got a few class names wrong in my response above, so it didn't make much sense. I've updated it to be correct now (if reading by email, please open the thread on GitHub to see the correct version). Thanks! |
Thank you for your answer. I was just composing my answer with a question if you meant |
Background: 1. When the player has multiple audio renderers, by default they share a single AudioSink. 2. When any new renderer is enabled, all disabled renderers are reset prior to the new renderer being enabled. This is to give them a chance to free up resources in case the renderer being enabled needs them. These reset calls are expected to be no-ops for renderers that have never been enabled. The issue: The problematic case arises when there are two audio renderers and a third renderer (e.g., text) is being enabled. In this case, the disabled audio renderer's reset call ends up resetting the AudioSink that's shared with the enabled audio renderer. The enabled audio renderer is then unable to make progress, causing playback to freeze. This is a minimal fix that directly prevents the mentioned issue. There are multiple follow-ups that would probably make sense: 1. Having ExoPlayerImplInternal track which renderers need to be reset, and only resetting those renderers rather than all that are disabled. This seems like a good thing to do regardless, rather than relying on those calls being no-ops. 2. If we want to continue sharing AudioSink, we need to formalize this much better and make sure we have good test coverage. Messages like MSG_SET_VOLUME are also delivered to the AudioSink multiple times via each of the renderers, which works currently because DefaultAudioSink no-ops all but the first call in each case. This is pretty fragile though! Issue: #8203 #minor-release PiperOrigin-RevId: 343296081
This is fixed by the change ref'd above. We'll include this in
|
Background: 1. When the player has multiple audio renderers, by default they share a single AudioSink. 2. When any new renderer is enabled, all disabled renderers are reset prior to the new renderer being enabled. This is to give them a chance to free up resources in case the renderer being enabled needs them. These reset calls are expected to be no-ops for renderers that have never been enabled. The issue: The problematic case arises when there are two audio renderers and a third renderer (e.g., text) is being enabled. In this case, the disabled audio renderer's reset call ends up resetting the AudioSink that's shared with the enabled audio renderer. The enabled audio renderer is then unable to make progress, causing playback to freeze. This is a minimal fix that directly prevents the mentioned issue. There are multiple follow-ups that would probably make sense: 1. Having ExoPlayerImplInternal track which renderers need to be reset, and only resetting those renderers rather than all that are disabled. This seems like a good thing to do regardless, rather than relying on those calls being no-ops. 2. If we want to continue sharing AudioSink, we need to formalize this much better and make sure we have good test coverage. Messages like MSG_SET_VOLUME are also delivered to the AudioSink multiple times via each of the renderers, which works currently because DefaultAudioSink no-ops all but the first call in each case. This is pretty fragile though! Issue: #8203 PiperOrigin-RevId: 343296081
[REQUIRED] Issue description
Video playback freezes after changing the closed captions track when using FFmpeg extension.
[REQUIRED] Reproduction steps
[REQUIRED] Link to test content
Provided by email.
[REQUIRED] A full bug report captured from the device
N/A
[REQUIRED] Version of ExoPlayer being used
2.12.1
[REQUIRED] Device(s) and version(s) of Android being used
No device specific
The text was updated successfully, but these errors were encountered: