[xiph-commits] r3791 - liboggz/trunk/src/liboggz

conrad at svn.annodex.net conrad at svn.annodex.net
Mon Nov 17 13:34:59 PST 2008


Author: conrad
Date: 2008-11-17 13:34:59 -0800 (Mon, 17 Nov 2008)
New Revision: 3791

Modified:
   liboggz/trunk/src/liboggz/oggz_seek.c
Log:
remove dead code in oggz_seek.c::oggz_get_next_page()


Modified: liboggz/trunk/src/liboggz/oggz_seek.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_seek.c	2008-11-17 21:34:54 UTC (rev 3790)
+++ liboggz/trunk/src/liboggz/oggz_seek.c	2008-11-17 21:34:59 UTC (rev 3791)
@@ -230,14 +230,6 @@
 	printf ("get_next_page: bytes == 0, returning -2\n");
 #endif
 	return -2;
-#if 0
-      } else if (oggz->file && feof (oggz->file)) {
-#ifdef DEBUG_VERBOSE
-	printf ("get_next_page: feof (oggz->file), returning -2\n");
-#endif
-	clearerr (oggz->file);
-	return -2;
-#endif
       }
 
       ogg_sync_wrote(&reader->ogg_sync, bytes);
@@ -614,7 +606,7 @@
 static ogg_int64_t
 oggz_seek_set (OGGZ * oggz, ogg_int64_t unit_target)
 {
-  OggzReader * reader;
+  OggzReader * reader = &oggz->x.reader;
   oggz_off_t offset_orig, offset_at, offset_guess;
   oggz_off_t offset_begin, offset_end = -1, offset_next;
   ogg_int64_t granule_at;
@@ -641,8 +633,6 @@
     return -1;
   }
 
-  reader = &oggz->x.reader;
-
   if (unit_target == reader->current_unit) {
 #ifdef DEBUG
     printf ("oggz_seek_set: unit_target == reader->current_unit, SKIP\n");
@@ -825,7 +815,7 @@
 off_t
 oggz_seek (OGGZ * oggz, oggz_off_t offset, int whence)
 {
-  OggzReader * reader;
+  OggzReader * reader = &oggz->x.reader;
   ogg_int64_t units = -1;
 
   if (oggz == NULL) return -1;
@@ -835,9 +825,7 @@
   }
 
   if (offset == 0 && whence == SEEK_SET) units = 0;
-
-  reader = &oggz->x.reader;
-
+  
   if (!(offset == 0 && whence == SEEK_CUR)) {
     /* Invalidate current_unit */
     reader->current_unit = -1;
@@ -849,7 +837,7 @@
 ogg_int64_t
 oggz_seek_units (OGGZ * oggz, ogg_int64_t units, int whence)
 {
-  OggzReader * reader;
+  OggzReader * reader = &oggz->x.reader;
 
   ogg_int64_t r;
 
@@ -874,8 +862,6 @@
     return -1;
   }
 
-  reader = &oggz->x.reader;
-
   switch (whence) {
   case SEEK_SET:
     r = oggz_seek_set (oggz, units);



More information about the commits mailing list