Automattic / Automattic/pocket-casts-android
Playback: App becomes unresponsive in some cases
- Dominant language
- Kotlin
- Stars
- 2.8k
- Forks
- 308
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 143
Description
### Description
We've got a report that the Android app becomes unresponsive when playing episodes in Pocket Casts via Bluetooth.
The Android app is not freezing but when it gets in this error state the play control is non-responsive.
The customer experiences the problem once a day, especially after listening to a different audio source. They also mentioned that the issue occurs even though episodes are downloaded, not streamed, and only happens with Pocket Casts.
Workaround: Killing Pocket Casts from the task switcher and the mini player from the notification area, then relaunching the app. The play button then works.
We said it could be related to https://github.com/androidx/media/issues/23
Logs:
```
E 08/11 09:05:42 Play failed.
androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(null, null, null, audio/mpeg, null, -1, null, [-1, -1, -1.0], [2, 44100]), format_supported=YES
at i5.t1.handleMessage(SourceFile:359)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException: Decoder failed: c2.sec.mp3.decoder
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.e0(SourceFile:3)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.s(SourceFile:154)
at i5.t1.q(SourceFile:97)
at i5.t1.handleMessage(SourceFile:223)
... 4 more
Caused by: android.media.MediaCodec$CodecException: Error 0xe
at android.media.MediaCodec.native_queueInputBuffer(Native Method)
at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2672)
at o5.e.g(SourceFile:8)
at o5.e.f(SourceFile:71)
at o5.e.a(SourceFile:1)
at o5.e$a.handleMessage(SourceFile:3)
at android.os.Handler.dispatchMessage(Handler.java:106)
... 3 more
E 08/11 09:05:42 Player error MediaCodecAudioRenderer error, index=1, format=Format(null, null, null, audio/mpeg, null, -1, null, [-1, -1, -1.0], [2, 44100]), format_supported=YES
I 08/11 09:05:42 Stopping playback
```
Slack thread: p1699519367670219-slack-C02A333D8LQ
Tickets:
7278254-zd-a8c
7327506-zd-a8c
### Step-by-step reproduction instructions
1. Listen to a podcast using a Bluetooth headset
2. Connect your phone to your cars Bluetooth and attempt to resume playback
### Screenshots or screen recording
_No response_
### Did you search for existing bug reports?
- [X] I have searched for existing bug reports.
### Device, Operating system, and Pocket Casts app version
App version : 7.52-rc-2 (9162)
Phone: samsung - Galaxy S21 Ultra 5G - SM-G998U - p3q
Android version: 13 SDK 33
Contributor guide
Research direction
Start by reproducing the Bluetooth handoff in the listed steps on the Galaxy S21 Ultra running Android 13, then compare the resulting logs with the linked AndroidX Media issue. Done means playback resumes reliably after switching audio sources and the play control remains responsive without the reported MediaCodecAudioRenderer error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100