changeset 1473:a2b4264a8072 trunk

[svn] - make sure our tuples we generate our pure. - in the overridden set_info() generate a tuple if one isn't already present.
author nenolod
date Wed, 02 Aug 2006 22:36:48 -0700
parents 04cdccf13105
children 6d690e50811f
files ChangeLog Plugins/Input/cue/cuesheet.c
diffstat 2 files changed, 25 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 02 22:28:10 2006 -0700
+++ b/ChangeLog	Wed Aug 02 22:36:48 2006 -0700
@@ -1,3 +1,12 @@
+2006-08-03 05:28:10 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1858]
+  - reset real_ip<InputPlugin *> when we are done with it
+  
+
+  Changes:        Modified:
+  +4 -0           trunk/Plugins/Input/cue/cuesheet.c  
+
+
 2006-08-03 05:25:35 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1856]
   - override InputPlugin::set_info.
--- a/Plugins/Input/cue/cuesheet.c	Wed Aug 02 22:28:10 2006 -0700
+++ b/Plugins/Input/cue/cuesheet.c	Wed Aug 02 22:36:48 2006 -0700
@@ -196,8 +196,8 @@
 
 	bmp_title_input_free(phys_tuple);
 
-	out->track_name = cue_tracks[track].title;
-	out->performer = cue_tracks[track].performer;
+	out->track_name = g_strdup(cue_tracks[track].title);
+	out->performer = g_strdup(cue_tracks[track].performer);
 
 	return out;
 }
@@ -220,9 +220,21 @@
 	real_ip = NULL;
 }
 
-static void set_info_override(gchar * title, gint length, gint rate, gint freq, gint nch)
+static void set_info_override(gchar * unused, gint length, gint rate, gint freq, gint nch)
 {
-	cue_ip.set_info(playlist_position->title, length, rate, freq, nch);
+	gchar *title;
+	(void) unused;
+
+	/* annoying. */
+	if (playlist_position->tuple == NULL)
+	{
+		gint pos = playlist_get_position();
+		playlist_get_tuple(pos);
+	}
+
+	title = g_strdup(playlist_position->title);
+
+	cue_ip.set_info(title, length, rate, freq, nch);
 }
 
 static void play_cue_uri(gchar *uri)