static void free_tag(struct id3_tag *id3_t)
{
int i, j;
+
+ if (!id3_t)
+ return;
for (i = 0; i < id3_t->nframes; i++) {
struct id3_frame *fr = id3_t->frames[i];
for (j = 0; j < fr->nfields; j++) {
ret = write_all(fd, (char *)v1_buffer, 128);
}
out:
- if (v1_tag)
- free_tag(v1_tag);
- if (v2_tag)
- free_tag(v2_tag);
+ free_tag(v1_tag);
+ free_tag(v2_tag);
return ret;
}
afhi->channels = header_channels(&header);
afhi->seconds_total = (tv2ms(&total_time) + 500) / 1000;
tv_divide(afhi->chunks_total, &total_time, &afhi->chunk_tv);
- PARA_DEBUG_LOG("%lu chunks, each %lums\n", afhi->chunks_total,
+ PARA_DEBUG_LOG("%" PRIu32 "chunks, each %lums\n", afhi->chunks_total,
tv2ms(&afhi->chunk_tv));
ret = mp3_get_id3(map, numbytes, fd, &afhi->tags);
afhi->techinfo = make_message("%cbr, %s, %s tags", vbr? 'v' : 'c',