[MPlayer-cvslog] r21525 - trunk/libmpdemux/demux_ogg.c
reimar
subversion at mplayerhq.hu
Thu Dec 7 13:02:52 CET 2006
Author: reimar
Date: Thu Dec 7 13:02:51 2006
New Revision: 21525
Modified:
trunk/libmpdemux/demux_ogg.c
Log:
vorbis_comment is only used locally, move it out of demuxer struct
Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c (original)
+++ trunk/libmpdemux/demux_ogg.c Thu Dec 7 13:02:51 2006
@@ -131,7 +131,6 @@
char **text_langs;
vorbis_info vi;
- vorbis_comment vc;
int vi_inited;
} ogg_demuxer_t;
@@ -749,9 +748,10 @@
unsigned char *buf[3];
unsigned char *ptr;
unsigned int len;
+ vorbis_comment vc;
vorbis_info_init(&od->vi);
- vorbis_comment_init(&od->vc);
+ vorbis_comment_init(&vc);
for(i = 0; i < 3; i++) {
op[i].bytes = ds_get_packet(sh->ds, &(op[i].packet));
mp_msg(MSGT_DEMUX,MSGL_V, "fixup_vorbis_wf: i=%d, size=%ld\n", i, op[i].bytes);
@@ -765,12 +765,13 @@
memcpy(buf[i], op[i].packet, op[i].bytes);
op[i].b_o_s = (i==0);
- ris = vorbis_synthesis_headerin(&(od->vi),&(od->vc),&(op[i]));
+ ris = vorbis_synthesis_headerin(&(od->vi),&vc,&(op[i]));
if(ris < 0) {
init_error = 1;
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"DEMUX_OGG: header n. %d broken! len=%ld, code: %d\n", i, op[i].bytes, ris);
}
}
+ vorbis_comment_clear(&vc);
if(!init_error)
od->vi_inited = 1;
@@ -1610,7 +1611,6 @@
free(ogg_d->text_langs);
}
vorbis_info_clear(&ogg_d->vi);
- vorbis_comment_clear(&ogg_d->vc);
free(ogg_d);
}
More information about the MPlayer-cvslog
mailing list