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

Video player crashes when in landscape mode #10070

Open
6 tasks done
nicolascolla opened this issue May 3, 2023 · 6 comments
Open
6 tasks done

Video player crashes when in landscape mode #10070

nicolascolla opened this issue May 3, 2023 · 6 comments
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background)

Comments

@nicolascolla
Copy link

nicolascolla commented May 3, 2023

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.25.1

Steps to reproduce the bug

  1. Open any video
  2. Hit play
  3. Put phone in landscape mode

Expected behavior

Video should play

Actual behavior

The video player crashes instantly when the screen is put in landscape mode.

Screenshots/Screen recordings

No response

Logs

Xiaomi Redmi Note 9 running LineageOS 20. The video player crashes when the screen is in landscape mode. The video player works in portrait, but will instantly crash when the screen is rotated.

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_DECODING_FAILED] occurred while playing https://www.youtube.com/watch?v=zxCJJIsxDSA
  • Content Country: ES
  • Content Language: es-ES
  • App Language: es_ES
  • Service: YouTube
  • Version: 0.25.1
  • OS: Linux Android 13 - 33
Crash log

com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(137, null, null, video/avc, avc1.640028, 4578418, null, [1920, 1080, 30.0], [-1, -1]), format_supported=YES
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:578)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: c2.android.avc.decoder
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1639)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:795)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502)
	... 4 more
Caused by: java.lang.IllegalStateException
	at android.media.MediaCodec.releaseOutputBuffer(Native Method)
	at android.media.MediaCodec.releaseOutputBufferInternal(MediaCodec.java:3688)
	at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:3662)
	at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecAdapter.releaseOutputBuffer(AsynchronousMediaCodecAdapter.java:189)
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.renderOutputBufferV21(MediaCodecVideoRenderer.java:1374)
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.processOutputBuffer(MediaCodecVideoRenderer.java:1137)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1881)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:774)
	... 6 more


Affected Android/Custom ROM version

LineageOS 20

Affected device model

Xiaomi Redmi Note 9

Additional information

No response

@nicolascolla nicolascolla added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels May 3, 2023
@opusforlife2
Copy link
Collaborator

Download a debug APK of Newpipe from one of the PRs, and go into the Exoplayer settings menu under Video and audio. Try the toggles one by one to see if it changes things. Most likely the set_surface one.

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label May 4, 2023
@nicolascolla
Copy link
Author

nicolascolla commented May 4, 2023

Download a debug APK of Newpipe from one of the PRs, and go into the Exoplayer settings menu under Video and audio. Try the toggles one by one to see if it changes things. Most likely the set_surface one.

I have downloaded a debug APK from #10062. Video rotation works as-is without having to try any of the toggles.

I have also downloaded the 0.25.0 release. It also works well.

But when I install the 0.25.1 release APK, both from F-Droid and Github, the issue persists.

Back to the debug APK, I can confirm that none of the three toggles under Video and audio -> Exoplayer settings make the app crash, at least when enabled individually. I remain available for further testing.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label May 4, 2023
@nicolascolla
Copy link
Author

nicolascolla commented May 4, 2023

After rolling back to 0.25.0, I have been able to reproduce this bug in it, too.

It seems to happen when video quality is set at 1080p or higher. 720p or less always runs fine. After realizing this, I have tried the debug APK again and the surface toggle does, in fact, solve the crashes, as you mentioned, although it introduces a three-second black screen when switching to full screen and video has pretty bad performance (lots of skipped frames).

I can also confirm that 1080p video works perfectly under MIUI on the same device.

@SameenAhnaf SameenAhnaf added device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background) and removed needs triage Issue is not yet ready for PR authors to take up labels May 5, 2023
@philibeur

This comment was marked as duplicate.

@Gipsysoftware

This comment was marked as duplicate.

@ech0devv
Copy link

This issue is still happening in a few apps on hyperos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background)
Projects
None yet
Development

No branches or pull requests

6 participants