diff options
Diffstat (limited to 'apps/mp3data.c')
-rw-r--r-- | apps/mp3data.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/mp3data.c b/apps/mp3data.c index 35b4608396..bb42c94fc6 100644 --- a/apps/mp3data.c +++ b/apps/mp3data.c | |||
@@ -448,12 +448,16 @@ static void get_vbri_info(struct mp3info *info, unsigned char *buf) | |||
448 | /* Seek to next mpeg header and extract relevant information. */ | 448 | /* Seek to next mpeg header and extract relevant information. */ |
449 | static int get_next_header_info(int fd, long *bytecount, struct mp3info *info) | 449 | static int get_next_header_info(int fd, long *bytecount, struct mp3info *info) |
450 | { | 450 | { |
451 | unsigned long header = find_next_frame(fd, bytecount, 0x20000, 0); | 451 | long tmp; |
452 | unsigned long header = find_next_frame(fd, &tmp, 0x20000, 0); | ||
452 | if(header == 0) | 453 | if(header == 0) |
453 | return -1; | 454 | return -1; |
454 | 455 | ||
455 | if(!mp3headerinfo(info, header)) | 456 | if(!mp3headerinfo(info, header)) |
456 | return -2; | 457 | return -2; |
458 | |||
459 | /* Next header is tmp bytes away. */ | ||
460 | *bytecount += tmp; | ||
457 | 461 | ||
458 | return 0; | 462 | return 0; |
459 | } | 463 | } |
@@ -461,7 +465,7 @@ static int get_next_header_info(int fd, long *bytecount, struct mp3info *info) | |||
461 | int get_mp3file_info(int fd, struct mp3info *info) | 465 | int get_mp3file_info(int fd, struct mp3info *info) |
462 | { | 466 | { |
463 | unsigned char frame[1800], *vbrheader; | 467 | unsigned char frame[1800], *vbrheader; |
464 | long bytecount; | 468 | long bytecount = 0; |
465 | int result; | 469 | int result; |
466 | 470 | ||
467 | /* Initialize info and frame */ | 471 | /* Initialize info and frame */ |