Mercurial > mplayer.hg
comparison libmpdemux/cddb.c @ 8557:97cf659a4c38
- fixed uninitialized offsets[]
- tracklist may not be closed by '.' but EOF
author | arpi |
---|---|
date | Tue, 24 Dec 2002 21:59:38 +0000 |
parents | 60624e692b95 |
children | 1d98280b9ad1 |
comparison
equal
deleted
inserted
replaced
8556:ecff1745d189 | 8557:97cf659a4c38 |
---|---|
364 ptr2 = strstr(ptr, "\r\n.\r\n"); | 364 ptr2 = strstr(ptr, "\r\n.\r\n"); |
365 if( ptr2==NULL ) { | 365 if( ptr2==NULL ) { |
366 ptr2 = strstr(ptr, "\n.\n"); | 366 ptr2 = strstr(ptr, "\n.\n"); |
367 if( ptr2==NULL ) { | 367 if( ptr2==NULL ) { |
368 printf("Unable to find '.'\n"); | 368 printf("Unable to find '.'\n"); |
369 return -1; | 369 ptr2=ptr+strlen(ptr); //return -1; |
370 } | 370 } |
371 } | 371 } |
372 // Ok found the end | 372 // Ok found the end |
373 // do a sanity check | 373 // do a sanity check |
374 if( http_hdr->body_size<(unsigned int)(ptr2-ptr) ) { | 374 if( http_hdr->body_size<(unsigned int)(ptr2-ptr) ) { |
578 | 578 |
579 ptr = offsets; | 579 ptr = offsets; |
580 for( i=0; i<cddb_data->tracks ; i++ ) { | 580 for( i=0; i<cddb_data->tracks ; i++ ) { |
581 ptr += sprintf(ptr, "%d+", cdtoc[i].frame ); | 581 ptr += sprintf(ptr, "%d+", cdtoc[i].frame ); |
582 } | 582 } |
583 ptr[0]=0; | |
583 time_len = (cdtoc[cddb_data->tracks].frame)/75; | 584 time_len = (cdtoc[cddb_data->tracks].frame)/75; |
584 | 585 |
585 cddb_data->freedb_server = DEFAULT_FREEDB_SERVER; | 586 cddb_data->freedb_server = DEFAULT_FREEDB_SERVER; |
586 cddb_data->freedb_proto_level = 1; | 587 cddb_data->freedb_proto_level = 1; |
587 cddb_data->xmcd_file = NULL; | 588 cddb_data->xmcd_file = NULL; |
588 | 589 |
589 cddb_create_hello(cddb_data); | 590 cddb_create_hello(cddb_data); |