Updating branch refs/heads/master to 45559f1b426b2acf63c92d961cb893316c9980f5 (commit) from 03b6551d241a054d1cf324cac4eb6c275b35d728 (commit)
commit 45559f1b426b2acf63c92d961cb893316c9980f5 Author: Sean Davis <smd.seanda...@gmail.com> Date: Thu Dec 27 19:07:32 2012 -0500 Potential memory leak fixes. src/gst/parole-gst.c | 16 ++++++++-------- src/parole-medialist.c | 3 ++- src/parole-player.c | 30 ++++++++++++++++++++++-------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c index 83b63af..1f9b0fd 100644 --- a/src/gst/parole-gst.c +++ b/src/gst/parole-gst.c @@ -1046,7 +1046,7 @@ parole_gst_tag_list_get_cover_external (ParoleGst *gst) const gchar *listing = NULL; gchar *lower = NULL; gchar *cover = NULL; - gchar *cover_filename; + gchar *cover_filename = NULL; g_object_get (G_OBJECT (gst->priv->stream), "uri", &uri, @@ -1080,15 +1080,15 @@ parole_gst_tag_list_get_cover_external (ParoleGst *gst) if (cover) { cover_filename = g_build_filename(directory, cover, NULL); - g_free(uri); - g_free(filename); - g_free(directory); - g_free(file_dir); - g_free(lower); - return cover_filename; + break; } } - return NULL; + g_free(uri); + g_free(filename); + g_free(directory); + g_free(file_dir); + g_free(lower); + return cover_filename; } static const GValue * diff --git a/src/parole-medialist.c b/src/parole-medialist.c index 9ac532e..575808f 100644 --- a/src/parole-medialist.c +++ b/src/parole-medialist.c @@ -1099,14 +1099,15 @@ void parole_media_list_clear_disc_list (ParoleMediaList *list) { gtk_list_store_clear (GTK_LIST_STORE (list->priv->disc_store)); - //parole_media_list_set_widget_sensitive (list, FALSE); } void parole_media_list_clear_list (ParoleMediaList *list) { + TRACE("CLEAR START"); gtk_list_store_clear (GTK_LIST_STORE (list->priv->store)); parole_media_list_set_widget_sensitive (list, FALSE); + TRACE("CLEAR END"); } static void diff --git a/src/parole-player.c b/src/parole-player.c index 29dd32f..5192223 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -571,7 +571,7 @@ parole_player_reset (ParolePlayer *player) gtk_window_set_title (GTK_WINDOW (player->priv->window), "Parole Media Player"); player->priv->audio_list = NULL; player->priv->subtitle_list = NULL; - player->priv->current_media_type = PAROLE_MEDIA_TYPE_UNKNOWN; + gtk_widget_hide(GTK_WIDGET(player->priv->infobar)); parole_player_change_range_value (player, 0); @@ -582,8 +582,16 @@ parole_player_reset (ParolePlayer *player) player->priv->row = NULL; } + if (player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD) + { + TRACE("CLEAR DVD LIST"); + parole_media_list_clear_disc_list (player->priv->list); + TRACE("END CLEAR DVD LIST"); + } + player->priv->current_media_type = PAROLE_MEDIA_TYPE_UNKNOWN; + parole_media_list_set_playlist_view(player->priv->list, PAROLE_MEDIA_LIST_PLAYLIST_VIEW_STANDARD); - //parole_media_list_clear_disc_list (player->priv->list); + } static void @@ -975,10 +983,6 @@ parole_player_media_activated_cb (ParoleMediaList *list, GtkTreeRowReference *ro GtkTreeIter iter; GtkTreeModel *model; - //parole_player_reset (player); - - //player->priv->row = gtk_tree_row_reference_copy (row); - model = gtk_tree_row_reference_get_model (row); if ( gtk_tree_model_get_iter (model, &iter, gtk_tree_row_reference_get_path (row)) ) @@ -1047,9 +1051,19 @@ parole_player_disc_selected_cb (ParoleDisc *disc, const gchar *uri, const gchar player->priv->current_media_type = parole_gst_get_current_stream_type (PAROLE_GST (player->priv->gst)); if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_CDDA ) + { player->priv->wait_for_gst_disc_info = TRUE; - - parole_media_list_clear_list (player->priv->list); + if ( player->priv->row ) + { + parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL); + gtk_tree_row_reference_free (player->priv->row); + player->priv->row = NULL; + } + TRACE("CLEAR PLAYLIST"); + parole_media_list_clear_list (player->priv->list); + TRACE("END CLEAR PLAYLIST"); + } + else parole_media_list_set_playlist_view(player->priv->list, PAROLE_MEDIA_LIST_PLAYLIST_VIEW_DISC); } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits