Commit 593a3c26 authored by conrad's avatar conrad

remove dead code in oggz_seek.c::oggz_get_next_page()


git-svn-id: http://svn.annodex.net/liboggz/trunk@3791 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 4daa143e
......@@ -230,14 +230,6 @@ oggz_get_next_page (OGGZ * oggz, ogg_page * og)
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 @@ oggz_offset_end (OGGZ * oggz)
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 @@ oggz_seek_set (OGGZ * oggz, ogg_int64_t unit_target)
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 @@ oggz_seek_end (OGGZ * oggz, ogg_int64_t unit_offset)
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 @@ oggz_seek (OGGZ * oggz, oggz_off_t offset, int whence)
}
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 @@ oggz_seek (OGGZ * oggz, oggz_off_t offset, int whence)
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 @@ oggz_seek_units (OGGZ * oggz, ogg_int64_t units, int whence)
return -1;
}
reader = &oggz->x.reader;
switch (whence) {
case SEEK_SET:
r = oggz_seek_set (oggz, units);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment