shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
238 stars 63 forks source link

The player crashes when calling load() before audio plays from previous load() #175

Open kareljuricka opened 3 years ago

kareljuricka commented 3 years ago

Issue description

The player crashes on load() with error: F1022 14:18:04.025405 1803857920 apple_audio_renderer.cc:235] Error queuing AudioQueueBuffer: -308

Reproduction steps

Forcing using shaka-player instead of avplayer with: self.player.configure("streaming.useNativeHlsOnSafari", with: false);

Request play some content with load() {... play() }

After video is loaded and playing but audio still not, do some another load()

App crashes with above error

Manifest

https://storage.googleapis.com/shaka-live-assets/player-source.m3u8

Log

crasg_log.txt

Version of Shaka Player Embedded

dccd0bb

Device(s) and version(s) of iOS being used

iPhone 11 Pro with iOS 14.0 Simulator with iOS 14.0 (without error log, but player stopped to work)

kareljuricka commented 3 years ago

After week I decided to do some more info, maybe it could help:

I can reproduce error on shaka demo content - I added manifest to issue.

I also updated to new version to try fix you added few days before, but it didn't helped.

If I prevent aborting app after this error, app still crash due to memory - Terminated due to memory issue. So it seems like some infinity loop appears.

More to reproduction: I don't wait until content is loaded. I interrupt previous load with new one. App crash after some try tries, most likely if I do load in specific step of previous buffering.

In our app users can seek in time. On each seek, we do load and play specific manifest. So there error is critical because of app crash.

Thanks for any help

kareljuricka commented 3 years ago

I finally found way how to reproduce error: When I call load() method in situation, that video from previous load() has been loaded and .play() was called but audio still not playing. In this occasion, app crashes always.

I updated title of issue and reproduction step in main description.