mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 00:55:12 +00:00
Fix crash on failed streaming.
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user