[xiph-cvs] cvs commit: libshout/src vorbis.c
Michael Smith
msmith at xiph.org
Sat May 17 06:58:09 PDT 2003
msmith 03/05/17 09:58:09
Modified: src vorbis.c
Log:
Use a seperate flag for 'initialised' so that serialno 0 can be used.
Revision Changes Path
1.8 +6 -2 libshout/src/vorbis.c
Index: vorbis.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/vorbis.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vorbis.c 2 Apr 2003 23:44:26 -0000 1.7
+++ vorbis.c 17 May 2003 13:58:09 -0000 1.8
@@ -30,6 +30,7 @@
int prevW;
long serialno;
+ int initialised;
} vorbis_data_t;
/* -- static prototypes -- */
@@ -80,8 +81,9 @@
ogg_sync_wrote(&vorbis_data->oy, len);
while (ogg_sync_pageout(&vorbis_data->oy, &og) == 1) {
- if (vorbis_data->serialno != ogg_page_serialno(&og)) {
-
+ if (vorbis_data->serialno != ogg_page_serialno(&og) ||
+ !vorbis_data->initialised)
+ {
/* Clear the old one - this is safe even if there was no previous
* stream */
vorbis_comment_clear(&vorbis_data->vc);
@@ -94,6 +96,8 @@
vorbis_info_init(&vorbis_data->vi);
vorbis_comment_init(&vorbis_data->vc);
+
+ vorbis_data->initialised = 1;
vorbis_data->headers = 1;
}
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list