5294b7faf1
- Add fix-audio-CD-playing.patch to make Audio CD playback work - Add Set-vlcMedia-to-NULL-after-release.patch to prevent a crash when the Audio CD cannot be opened for some reason OBS-URL: https://build.opensuse.org/request/show/645276 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kaffeine?expand=0&rev=39
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From dbe1593af6bfb54460d249f960936f1378224eb8 Mon Sep 17 00:00:00 2001
|
|
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
|
Date: Sun, 28 Oct 2018 06:34:13 -0300
|
|
Subject: vlcmediawidget: Set vlcMedia to NULL after release
|
|
|
|
As we're now calling the code at makePlay() on two different
|
|
places, we should ensure that it will only work if vlcMedia
|
|
was created.
|
|
|
|
Without that, if someone tries to play an audio CD and it
|
|
fails for whatever reason (like if the system doesn't have
|
|
a CD device), it crashes.
|
|
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
|
---
|
|
src/backend-vlc/vlcmediawidget.cpp | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/src/backend-vlc/vlcmediawidget.cpp b/src/backend-vlc/vlcmediawidget.cpp
|
|
index 1f5d61d..e7bc801 100644
|
|
--- a/src/backend-vlc/vlcmediawidget.cpp
|
|
+++ b/src/backend-vlc/vlcmediawidget.cpp
|
|
@@ -353,6 +353,7 @@ void VlcMediaWidget::makePlay()
|
|
|
|
libvlc_media_player_set_media(vlcMediaPlayer, vlcMedia);
|
|
libvlc_media_release(vlcMedia);
|
|
+ vlcMedia = NULL;
|
|
|
|
if (libvlc_media_player_play(vlcMediaPlayer) != 0)
|
|
return;
|
|
--
|
|
cgit v0.11.2
|
|
|