[xiph-cvs] cvs commit: ices/src im_playlist.c im_playlist.h
Karl Heyes
karl at xiph.org
Mon Jan 12 15:39:40 PST 2004
karl 04/01/12 18:39:40
Modified: src im_playlist.c im_playlist.h
Log:
extra check for the same serial number between consecutive files, warn the
user and move onto the next.
Revision Changes Path
1.15 +12 -1 ices/src/im_playlist.c
Index: im_playlist.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/im_playlist.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- im_playlist.c 25 Aug 2003 19:56:55 -0000 1.14
+++ im_playlist.c 12 Jan 2004 23:39:39 -0000 1.15
@@ -1,7 +1,7 @@
/* playlist.c
* - Basic playlist functionality
*
- * $Id: im_playlist.c,v 1.14 2003/08/25 19:56:55 karl Exp $
+ * $Id: im_playlist.c,v 1.15 2004/01/12 23:39:39 karl Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -164,6 +164,17 @@
LOG_WARN1("Corrupt or missing data in file (%s)", pl->filename);
else if(result > 0)
{
+ if (ogg_page_bos (&og))
+ {
+ if (ogg_page_serialno (&og) == pl->current_serial)
+ {
+ LOG_WARN1 ("Skipping \"%s\" as the serial number is the same as previous", pl->filename);
+ pl->nexttrack = 1;
+ pl->errors++;
+ return 0;
+ }
+ pl->current_serial = ogg_page_serialno (&og);
+ }
if (input_calculate_ogg_sleep (&og) < 0)
{
pl->nexttrack = 1;
<p><p>1.6 +2 -1 ices/src/im_playlist.h
Index: im_playlist.h
===================================================================
RCS file: /usr/local/cvsroot/ices/src/im_playlist.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- im_playlist.h 13 Aug 2003 00:58:02 -0000 1.5
+++ im_playlist.h 12 Jan 2004 23:39:39 -0000 1.6
@@ -1,7 +1,7 @@
/* im_playlist.h
* - Basic playlist functionality
*
- * $Id: im_playlist.h,v 1.5 2003/08/13 00:58:02 karl Exp $
+ * $Id: im_playlist.h,v 1.6 2004/01/12 23:39:39 karl Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -22,6 +22,7 @@
FILE *current_file;
char *filename; /* Currently streaming file */
int errors; /* Consecutive errors */
+ int current_serial;
int nexttrack;
int allow_repeat;
ogg_sync_state oy;
<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