changeset 4076:8f9966f00c98

deep copy is needed!
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sat, 08 Dec 2007 02:14:10 +0900
parents 6f4ee8c0d0d7
children bcdf787d3a1a
files src/audacious/playlist.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playlist.c	Sat Dec 08 01:14:18 2007 +0900
+++ b/src/audacious/playlist.c	Sat Dec 08 02:14:10 2007 +0900
@@ -155,7 +155,7 @@
 
 static gint filter_by_extension(const gchar *filename);
 static gboolean is_http(const gchar *filename);
-static gboolean do_precheck(Playlist *playlist, const gchar *uri, ProbeResult *pr);
+static gboolean do_precheck(Playlist *playlist, const gchar *uri, ProbeResult **pr);
 
 static mowgli_heap_t *playlist_entry_heap = NULL;
 
@@ -781,7 +781,7 @@
         return TRUE;
     }
 
-    if(do_precheck(playlist, filename, pr)) {
+    if(do_precheck(playlist, filename, &pr)) {
         if(pr) {
             dec = pr->ip;
             tuple = pr->tuple;
@@ -1697,7 +1697,7 @@
     g_return_if_fail(playlist_name != NULL);
     g_return_if_fail(playlist != NULL);
 
-    if(do_precheck(playlist, uri, pr)) {
+    if(do_precheck(playlist, uri, &pr)) {
         __playlist_ins_file(playlist, uri, pos, NULL, title, len, pr ? pr->ip : NULL);
     }
     g_free(pr);
@@ -1716,7 +1716,7 @@
     g_return_if_fail(playlist_name != NULL);
     g_return_if_fail(playlist != NULL);
 
-    if(do_precheck(playlist, uri, pr)) {
+    if(do_precheck(playlist, uri, &pr)) {
         __playlist_ins_file(playlist, uri, pos, tuple, NULL, -1, pr ? pr->ip : NULL);
     }
     g_free(pr);
@@ -1724,7 +1724,7 @@
 }
 
 static gboolean
-do_precheck(Playlist *playlist, const gchar *uri, ProbeResult *pr)
+do_precheck(Playlist *playlist, const gchar *uri, ProbeResult **pr)
 {
     gint ext_flag = filter_by_extension(uri);
     gboolean http_flag = is_http(uri);
@@ -1748,8 +1748,8 @@
     }
     /* find decorder for local file */
     else {
-        pr = input_check_file(uri, TRUE);
-        if(pr) {
+        *pr = input_check_file(uri, TRUE);
+        if(*pr) {
             AUDDBG("got pr\n");
             rv = TRUE;
         }