From d97842f5815df66d5c653c88aa98cf4b98202794 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Sun, 9 Dec 2001 18:11:34 +0000 Subject: Add cddb infos caching. Fix billion call of cddb server. Fix autoplay crash bug in cda/vcd/dvd. CVS patchset: 1194 CVS date: 2001/12/09 18:11:34 --- src/input/input_vcd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/input/input_vcd.c') diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 20d8cb12d..fb1fac5bb 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.31 2001/11/18 03:53:23 guenter Exp $ + * $Id: input_vcd.c,v 1.32 2001/12/09 18:11:34 f1rmb Exp $ * */ @@ -1057,10 +1057,15 @@ static char **vcd_plugin_get_autoplay_list (input_plugin_t *this_gen, /* printf ("%d tracks\n", this->total_tracks); */ for (i = 1; i < this->total_tracks; i++) { /* FIXME: check if track 0 contains valid data */ + + if(this->filelist[i - 1] == NULL) + this->filelist[i - 1] = (char *) realloc(this->filelist[i - 1], sizeof(char *) * 256); + sprintf (this->filelist[i - 1], "vcd://%d",i); /* printf ("list[%d] : %d %s\n", i, this->filelist[i-1], this->filelist[i-1]); */ } + this->filelist[i - 1] = (char *) realloc(this->filelist[i-1], sizeof(char *)); this->filelist[i - 1] = NULL; return this->filelist; @@ -1106,7 +1111,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) { config = xine->config; for (i = 0; i < 100; i++) { - this->filelist[i] = (char *) xine_xmalloc (256); + this->filelist[i] = (char *) xine_xmalloc(sizeof(char *) * 256); } this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION; -- cgit v1.2.3