1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-09 16:43:00 +01:00

Correctly freeing memory in CddaSongLoader::LoadSongsFromCdda

This commit is contained in:
Lukas Prediger 2021-05-14 21:53:54 +03:00 committed by John Maguire
parent 97800e613a
commit 436c53870a

View File

@ -49,6 +49,7 @@ QUrl CddaSongLoader::GetUrlFromTrack(int track_number) const {
void CddaSongLoader::LoadSongs() {
QtConcurrent::run(this, &CddaSongLoader::LoadSongsFromCdda);
}
void CddaSongLoader::LoadSongsFromCdda() {
QMutexLocker locker(&mutex_load_);
cdio_ = cdio_open(url_.path().toLocal8Bit().constData(), DRIVER_DEVICE);
@ -155,6 +156,8 @@ void CddaSongLoader::LoadSongsFromCdda() {
songs[i++].set_length_nanosec(duration);
}
}
g_list_free(entries);
gst_toc_unref(toc);
}
gst_message_unref(msg_toc);
}
@ -172,9 +175,10 @@ void CddaSongLoader::LoadSongsFromCdda() {
emit MusicBrainzDiscIdLoaded(musicbrainz_discid);
g_free(string_mb);
gst_message_unref(msg_tag);
gst_tag_list_free(tags);
}
gst_message_unref(msg_tag);
gst_tag_list_free(tags);
}
gst_element_set_state(pipeline, GST_STATE_NULL);