summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_ty.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-14 16:44:52 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-14 16:44:52 +0000
commitbd5e05cde49611f21217a594f4138e65c76ae6ed (patch)
treedea0cbc8a0dba3f7d96d6eed819390042c304f84 /libmpdemux/demux_ty.c
parent9ec6875d20e68fe37ebcc90f7e9e31ef080bcbc8 (diff)
downloadmpv-bd5e05cde49611f21217a594f4138e65c76ae6ed.tar.bz2
mpv-bd5e05cde49611f21217a594f4138e65c76ae6ed.tar.xz
Simplify EOF handling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24472 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_ty.c')
-rw-r--r--libmpdemux/demux_ty.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libmpdemux/demux_ty.c b/libmpdemux/demux_ty.c
index 828345147e..aba5919843 100644
--- a/libmpdemux/demux_ty.c
+++ b/libmpdemux/demux_ty.c
@@ -282,19 +282,13 @@ static int tmf_load_chunk( demuxer_t *demux, TiVoInfo *tivo,
mp_msg( MSGT_DEMUX, MSGL_DBG3, "\ntmf_load_chunk() begin %d\n",
readChunk );
- if ( tivo->tmf_totalparts <= 0 )
- {
- return( 0 );
- }
+ fileoffset = tmf_filetooffset(tivo, readChunk);
- if ( readChunk >= tivo->tmf_totalchunks )
- {
- mp_msg( MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n" );
- return( 0 );
+ if (fileoffset == -1) {
+ mp_msg(MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n");
+ return 0;
}
- fileoffset = tmf_filetooffset(tivo, readChunk);
-
if ( stream_seek( demux->stream, fileoffset ) != 1 )
{
mp_msg( MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n" );