comparison src/madplug/input.c @ 776:8366ad444313 trunk

[svn] - by unknown reason, http connection via proxy server needs a transfer stop after tag retrieving.
author yaz
date Sat, 03 Mar 2007 17:36:01 -0800
parents a24cc8848b9a
children 83a38bcfe7c8
comparison
equal deleted inserted replaced
775:a24cc8848b9a 776:8366ad444313
350 */ 350 */
351 static void input_read_tag(struct mad_info_t *info) 351 static void input_read_tag(struct mad_info_t *info)
352 { 352 {
353 gchar *string = NULL; 353 gchar *string = NULL;
354 TitleInput *title_input; 354 TitleInput *title_input;
355 glong curpos;
355 356
356 #ifdef DEBUG 357 #ifdef DEBUG
357 g_message("f: input_read_tag"); 358 g_message("f: input_read_tag");
358 #endif 359 #endif
359 if (info->tuple == NULL) { 360 if (info->tuple == NULL) {
361 info->tuple = title_input; 362 info->tuple = title_input;
362 } 363 }
363 else 364 else
364 title_input = info->tuple; 365 title_input = info->tuple;
365 366
366 if(info->infile) 367 if(info->infile) {
368 curpos = vfs_ftell(info->infile);
367 info->id3file = id3_file_vfsopen(info->infile, ID3_FILE_MODE_READONLY); 369 info->id3file = id3_file_vfsopen(info->infile, ID3_FILE_MODE_READONLY);
370 }
368 else 371 else
369 info->id3file = id3_file_open(info->filename, ID3_FILE_MODE_READONLY); 372 info->id3file = id3_file_open(info->filename, ID3_FILE_MODE_READONLY);
370 373
371 if (!info->id3file) { 374 if (!info->id3file) {
372 #ifdef DEBUG 375 #ifdef DEBUG
430 } 433 }
431 434
432 info->title = xmms_get_titlestring(audmad_config.title_override == TRUE ? 435 info->title = xmms_get_titlestring(audmad_config.title_override == TRUE ?
433 audmad_config.id3_format : xmms_get_gentitle_format(), title_input); 436 audmad_config.id3_format : xmms_get_gentitle_format(), title_input);
434 437
438 // for connection via proxy, we have to stop transfer once. I can't explain the reason.
439 vfs_fseek(info->infile, -1, SEEK_SET); // impossible request
440 vfs_fseek(info->infile, curpos, SEEK_SET);
441
435 #ifdef DEBUG 442 #ifdef DEBUG
436 g_message("e: input_read_tag"); 443 g_message("e: input_read_tag");
437 #endif 444 #endif
438 445
439 } 446 }