X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=ogg_afh.c;h=5adcc25218377e57c8b038e30e325268aeb6e86f;hb=970247623b17124a5aacb14a8061da56e1f3b0be;hp=078ff786883b53c17b83ffc04f42cb61bc0be4c5;hpb=095fc31c48324112a71602ba6975d9d33cf4378e;p=paraslash.git diff --git a/ogg_afh.c b/ogg_afh.c index 078ff786..5adcc252 100644 --- a/ogg_afh.c +++ b/ogg_afh.c @@ -117,12 +117,6 @@ static int ogg_open_callbacks(void *datasource, OggVorbis_File *vf, ov_callbacks } -static void ogg_save_header(char *map, struct audio_format_info *afi) -{ - afi->header = para_malloc(afi->header_len); - memcpy(afi->header, map, afi->header_len); -} - static int ogg_compute_header_len(char *map, off_t numbytes, struct audio_format_info *afi) { @@ -187,7 +181,7 @@ static int ogg_compute_header_len(char *map, off_t numbytes, while (ogg_stream_flush(stream_out, &page)) afi->header_len += page.body_len + page.header_len; PARA_INFO_LOG("header_len = %d\n", afi->header_len); - ogg_save_header(map, afi); + afi->header_offset = 0; ret = 1; err2: ogg_stream_destroy(stream_in); @@ -287,8 +281,6 @@ static int ogg_get_file_info(char *map, off_t numbytes, ret = 1; err: ov_clear(&of); /* keeps the file open */ - if (ret < 0) - free(afi->header); return ret; }