diff src/cue/cuesheet.c @ 602:20b8e735f69e trunk

[svn] - adaptation for playback API. make cuesheet plugin pass playback->output to real_ip.
author yaz
date Sat, 03 Feb 2007 08:55:23 -0800
parents d5782f3bd760
children 4a2b2677dd9b
line wrap: on
line diff
--- a/src/cue/cuesheet.c	Fri Feb 02 14:42:27 2007 -0800
+++ b/src/cue/cuesheet.c	Sat Feb 03 08:55:23 2007 -0800
@@ -136,10 +136,7 @@
 
 static gint get_time(InputPlayback *playback)
 {
-	if (real_ip)
-		return real_ip->plugin->get_time(real_ip);
-
-	return -1;
+	return playback->output->output_time();
 }
 
 static void play(InputPlayback *data)
@@ -325,6 +322,11 @@
 		real_ip->plugin->set_info = set_info_override;
 		real_ip->plugin->output = cue_ip.output;
 		real_ip->filename = cue_file;
+
+		/* need to pass playback->output to real_ip */
+		real_ip->output = data->output;
+		real_ip->data = data->data;
+
 		real_ip->plugin->play_file(real_ip);
 		real_ip->plugin->seek(real_ip, finetune_seek ? finetune_seek / 1000 : cue_tracks[track].index / 1000 + 1);
 		// in some plugins, NULL as 2nd arg causes crash.