FS#1422 - id3.c : parsenum() too specific

Attached to Project: Rockbox
Opened by Jeremy Zoss (jzoss) - Friday, 06 June 2003, 04:42 GMT
Last edited by Daniel Stenberg (bagder) - Friday, 05 December 2003, 09:31 GMT
Task Type Bugs
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


In new generic id3.c code, parsenum is too specific:

static int parsenum( struct mp3entry* entry, char* tag,
int bufferpos )
entry->tracknum = atoi( tag );
return bufferpos;

But gets called for BOTH year and tracknum tags. So
entry->year never gets set for id3v2 tags, and entry-
>tracknum will be set to year value if TYER occurs after
TRCK. String fields (yearstring, trackstring) are correct,
but associated numeric fields are wrong

Easiest fix is probably to use separate functions for
parseyear and parsetracknum.

This task depends upon

Closed by  Daniel Stenberg (bagder)
Friday, 05 December 2003, 09:31 GMT
Reason for closing:  Fixed
Comment by Daniel Stenberg (bagder) - Friday, 06 June 2003, 07:55 GMT

committed fix to CVS now. Thanks for reporting!