diff --git a/GstreamerHelper/GstreamerAudio.cpp b/GstreamerHelper/GstreamerAudio.cpp index 365dc3f4..1e5f6baf 100644 --- a/GstreamerHelper/GstreamerAudio.cpp +++ b/GstreamerHelper/GstreamerAudio.cpp @@ -83,6 +83,7 @@ DllExport void Close(int Stream) if(it != Streams.end()) { delete it->second; + IDs.push(it->first); Streams.erase(it); } } @@ -236,6 +237,7 @@ DllExport void Update(void) if(p->second->Closed) { delete p->second; + IDs.push(p->first); Streams.erase(p++); } else { diff --git a/GstreamerHelper/GstreamerAudioStream.cpp b/GstreamerHelper/GstreamerAudioStream.cpp index 212b9eaa..7fbf632a 100644 --- a/GstreamerHelper/GstreamerAudioStream.cpp +++ b/GstreamerHelper/GstreamerAudioStream.cpp @@ -92,11 +92,14 @@ int GstreamerAudioStream::Load(const wchar_t* Media, bool Prescan) void GstreamerAudioStream::Close(void) { if(Element) + { gst_element_set_state(Element, GST_STATE_NULL); + gst_object_unref(GST_OBJECT (Element)); + } + + /* without that there are no crashes any more. but i don't know if there is a memory leak if we do that. if(Bus) gst_object_unref(Bus); - if(Element) - gst_object_unref(Element); if(Message) gst_message_unref(Message); if(Convert) @@ -109,6 +112,8 @@ void GstreamerAudioStream::Close(void) gst_object_unref(GhostPad); if(SinkBin) gst_object_unref(SinkBin); + */ + if(FadeTimer) g_timer_destroy (FadeTimer); diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index 0aa110b2..bcf1f712 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -136,7 +136,7 @@ namespace Vocaluxe.Base if (CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_ONLY_OWN_MUSIC) AddBackgroundMusic(); - if (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON) + if (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON && CConfig.VideosToBackground == EOffOn.TR_CONFIG_ON) _VideoEnabled = true; IsPlaying = false; diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs index 8ff84dc1..b3f6fa87 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs @@ -237,6 +237,7 @@ namespace VocaluxeLib.Menu.SongMenu protected CSongMenuFramework(int partyModeID) { _PartyModeID = partyModeID; + _Video = -1; _Theme = new SThemeSongMenu { SongMenuTileBoard =