[MPlayer-cvslog] r24472 - trunk/libmpdemux/demux_ty.c
reimar
subversion at mplayerhq.hu
Fri Sep 14 18:44:52 CEST 2007
Author: reimar
Date: Fri Sep 14 18:44:52 2007
New Revision: 24472
Log:
Simplify EOF handling
Modified:
trunk/libmpdemux/demux_ty.c
Modified: trunk/libmpdemux/demux_ty.c
==============================================================================
--- trunk/libmpdemux/demux_ty.c (original)
+++ trunk/libmpdemux/demux_ty.c Fri Sep 14 18:44:52 2007
@@ -282,19 +282,13 @@ static int tmf_load_chunk( demuxer_t *de
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" );
More information about the MPlayer-cvslog
mailing list