comparison src/cue/cuesheet.c @ 2710:1756960988e5

Replace a wtf static buffer with dynamic allocation.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 16 Jun 2008 06:20:03 +0300
parents 04249b58c738
children 6abe60a81301
comparison
equal deleted inserted replaced
2709:04249b58c738 2710:1756960988e5
156 /* add the files, build cue urls, etc. */ 156 /* add the files, build cue urls, etc. */
157 cache_cue_file(filename); //filename should be uri. 157 cache_cue_file(filename); //filename should be uri.
158 158
159 for (i = 0; i < last_cue_track; i++) 159 for (i = 0; i < last_cue_track; i++)
160 { 160 {
161 gchar _buf[65535]; 161 gchar *tmp = g_strdup_printf("cue://%s?%d", filename, i);
162 162 aud_playlist_add_url(aud_playlist_get_active(), tmp);
163 g_snprintf(_buf, 65535, "cue://%s?%d", filename, i); 163 g_free(tmp);
164 aud_playlist_add_url(aud_playlist_get_active(), _buf);
165 } 164 }
166 165
167 free_cue_info(); 166 free_cue_info();
168 167
169 return -1; 168 return -1;
188 uri = tmp; 187 uri = tmp;
189 } 188 }
190 play_thread = g_thread_self(); 189 play_thread = g_thread_self();
191 data->set_pb_ready(data); // it should be done in real input plugin? --yaz 190 data->set_pb_ready(data); // it should be done in real input plugin? --yaz
192 play_cue_uri(data, uri); 191 play_cue_uri(data, uri);
193 g_free(uri); uri = NULL; 192 g_free(uri);
194 } 193 }
195 194
196 static Tuple *get_tuple(gchar *uri) 195 static Tuple *get_tuple(gchar *uri)
197 { 196 {
198 Tuple *ret; 197 Tuple *ret;