NewPipe/app
evermind f78d2a5ed8 Prevent error msg: 'Unrecoverable player error occurred' while playing video during rotation (#6502)
Playing a video in VideoDetailFragment and rotating the screen to landscape (back and forth more often)
can trigger this error message. Especially if rotation for whatever reason takes long or
playing a high resolution (1080p) video.

The underlying logcat error messages:
05-12 16:38:38.251 24920 26037 E Surface : getSlotFromBufferLocked: unknown buffer: 0x923fc810
05-12 16:38:38.251 24920 26037 W ACodec  : [OMX.qcom.video.decoder.avc] can not return buffer 35 to native window

The problem is that that Exoplayer is trying to write to our -- during rotation -- no longer existant
(VideoDetailFragment) SurfaceView.

Solution:
Implementing SurfaceHolder.Callback and using DummySurface we can now handle the lifecycle of the Surface.

How?: In case we are no longer able to write to the Surface eg. through rotation/putting in
background we can set a DummySurface. Although it only works on API >= 23.
Result: we get a little video interruption (audio is still fine) but we won't get the
'Unrecoverable player error occurred' error message.

This implementation is based on and more background information:
 'ExoPlayer stuck in buffering after re-adding the surface view a few time 2703'

 -> exoplayer fix suggestion link
  https://github.com/google/ExoPlayer/issues/2703#issuecomment-300599981
2021-07-06 12:49:56 +02:00
..
schemas/org.schabi.newpipe.database.AppDatabase Implement feed groups manual sorting 2020-03-14 00:12:45 -03:00
src Prevent error msg: 'Unrecoverable player error occurred' while playing video during rotation (#6502) 2021-07-06 12:49:56 +02:00
.gitignore Update app/.gitignore 2020-02-19 17:40:03 +01:00
build.gradle Merge pull request #6313 from Isira-Seneviratne/Update_Room_to_2.3.0 2021-06-09 16:28:55 +02:00
proguard-rules.pro Show parsed relative times instead of whatever the service gives us 2019-11-17 23:58:55 -03:00