Skip to content
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

Update ExoPlayer to 2.18.2 #9553

Merged
merged 2 commits into from
Jan 2, 2023
Merged

Update ExoPlayer to 2.18.2 #9553

merged 2 commits into from
Jan 2, 2023

Conversation

Redirion
Copy link
Member

@Redirion Redirion commented Dec 16, 2022

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Update ExoPlayer: 2.18.1 -> 2.18.2 (changelog)
  • Simplify LoadedMediaSource by extending the new WrappingMediaSource class of ExoPlayer 2.18.2. This basically saves a few lines of code and has smaller memory footprint due to less complexity than the CompositeMediaSource used earlier. PlaceHolderMediaSource has still to use the CompositeMediaSource unfortunately, as WrappingMediaSource is not null tolerable.

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@AudricV AudricV added player Issues related to any player (main, popup and background) codequality Improvements to the codebase to improve the code quality labels Dec 16, 2022
@AudricV
Copy link
Member

AudricV commented Dec 31, 2022

Could you rebase this PR, please, so we only have the ExoPlayer changes? Thank you in advance!

@sonarcloud
Copy link

sonarcloud bot commented Jan 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Redirion
Copy link
Member Author

Redirion commented Jan 2, 2023

Done, if you approve the PR, I can squash and merge it

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The WrappingMediaSource implements the methods you removed in basically the same way. I tested a bit the player and found no problem. Thanks!

@Stypox Stypox merged commit 1bb166a into TeamNewPipe:dev Jan 2, 2023
@Redirion Redirion deleted the exo182 branch January 2, 2023 17:24
@Stypox
Copy link
Member

Stypox commented Jan 20, 2023

Since this was merged I started getting the following exception on various videos in debug builds.

Steps to reproduce:

  • play this video at 720p (but it also happens with other videos, e.g. this)
  • wait some time (you may also need to switch to another app and let the player in the background, but I could reproduce even without this)
  • the player crashes

If I revert your commit the issue does not seem to appear anymore, so I'm pretty sure the problem is here.

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_FAILED_RUNTIME_CHECK] occurred while playing https://www.youtube.com/watch?v=hsECdMrjh8c
  • Content Country: GB
  • Content Language: en-GB
  • App Language: en_GB
  • Service: YouTube
  • Version: 0.24.1
  • OS: Linux Android 10 - 29
com.google.android.exoplayer2.ExoPlaybackException: Unexpected runtime error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:621)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalStateException
	at android.media.MediaCodec.native_setSurface(Native Method)
	at android.media.MediaCodec.setOutputSurface(MediaCodec.java:2045)
	at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter.setOutputSurface(SynchronousMediaCodecAdapter.java:189)
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:1490)
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutput(MediaCodecVideoRenderer.java:693)
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:631)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:1550)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:1514)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:1489)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:526)
	... 3 more

@Stypox Stypox mentioned this pull request Jan 22, 2023
3 tasks
Stypox added a commit that referenced this pull request Feb 7, 2023
Revert PR #9553 "Update ExoPlayer to 2.18.2"
@Redirion Redirion mentioned this pull request Feb 23, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codequality Improvements to the codebase to improve the code quality player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants