mirror of https://github.com/procxx/kepka.git
Fix crash on failed streaming.
This commit is contained in:
parent
91bdb66f0d
commit
f0963a332a
|
@ -442,7 +442,8 @@ void Instance::stop(AudioMsgId::Type type) {
|
||||||
void Instance::playPause(AudioMsgId::Type type) {
|
void Instance::playPause(AudioMsgId::Type type) {
|
||||||
if (const auto data = getData(type)) {
|
if (const auto data = getData(type)) {
|
||||||
if (data->streamed) {
|
if (data->streamed) {
|
||||||
if (data->streamed->player.finished()) {
|
if (data->streamed->player.finished()
|
||||||
|
|| data->streamed->player.failed()) {
|
||||||
auto options = Streaming::PlaybackOptions();
|
auto options = Streaming::PlaybackOptions();
|
||||||
options.mode = Streaming::Mode::Audio;
|
options.mode = Streaming::Mode::Audio;
|
||||||
options.audioId = data->streamed->id;
|
options.audioId = data->streamed->id;
|
||||||
|
|
Loading…
Reference in New Issue