* Return the length of the next frame header or zero if the end of the file is
* reached.
*/
-static int mp3_seek_next_header(unsigned char *map, size_t numbytes, off_t *fpos)
+static int mp3_seek_next_header(unsigned char *map, size_t numbytes, off_t *fpos,
+ struct mp3header *result)
{
int k, l = 0, first_len;
struct mp3header h, h2;
}
if (k == MIN_CONSEC_GOOD_FRAMES) {
*fpos = valid_start;
- mp3.header = h2;
+ *result = h2;
return first_len;
}
}
if (frame_len < 0)
return frame_len;
if (!frame_len) {
- frame_len = mp3_seek_next_header(map, numbytes, fpos);
+ frame_len = mp3_seek_next_header(map, numbytes, fpos, &mp3.header);
if (frame_len <= 0)
return frame_len;
} else