Simplify EOF handling

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24472 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-09-14 16:44:52 +00:00
parent 9ec6875d20
commit bd5e05cde4
1 changed files with 5 additions and 11 deletions

View File

@ -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 );
}
if ( readChunk >= tivo->tmf_totalchunks )
{
mp_msg( MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n" );
return( 0 );
}
fileoffset = tmf_filetooffset(tivo, readChunk);
if (fileoffset == -1) {
mp_msg(MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n");
return 0;
}
if ( stream_seek( demux->stream, fileoffset ) != 1 )
{
mp_msg( MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n" );