changeset 24464:41c96af4be72

Yet more cosmetics
author reimar
date Fri, 14 Sep 2007 18:19:10 +0000
parents f93cfdc6f4f5
children 8eb74a8f8da7
files libmpdemux/demux_ty.c
diffstat 1 files changed, 5 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ty.c	Fri Sep 14 18:03:36 2007 +0000
+++ b/libmpdemux/demux_ty.c	Fri Sep 14 18:19:10 2007 +0000
@@ -251,7 +251,7 @@
    if ( stream_seek( demux->stream, fileoffset ) != 1 )
    {
       mp_msg( MSGT_DEMUX, MSGL_ERR, "Read past EOF()\n" );
-      return( 0 );
+      return 0;
    }
    count = stream_read( demux->stream, buff, size );
 	demux->filepos = stream_tell( demux->stream );
@@ -345,8 +345,7 @@
          size );
       return 0;
    }
-   else
-      return 1;
+   return 1;
 }
 
 
@@ -511,9 +510,7 @@
       tivo->firstVideoPTS = MP_NOPTS_VALUE;
    }
    else
-   {
       tivo = demux->a_streams[ MAX_A_STREAMS - 1 ];
-   }
 
    if( demux->stream->eof ) return 0;
  
@@ -635,13 +632,10 @@
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
       "\nty:wanted current offset %"PRIx64"\n", (int64_t)stream_tell( demux->stream ) );
 
-   if ( tivo->size > 0 )
+   if ( tivo->size > 0 && stream_tell( demux->stream ) > tivo->size )
    {
-      if ( stream_tell( demux->stream ) > tivo->size )
-      {
          demux->stream->eof = 1;
-         return( 0 );
-      }
+         return 0;
    }
 
    if ( tivo->tmf != 1 )
@@ -651,9 +645,7 @@
       {
          whichChunk = demux->filepos / CHUNKSIZE;
          if ( demux->filepos % CHUNKSIZE > CHUNKSIZE / 2 )
-         {
             whichChunk++;
-         }
          stream_seek( demux->stream, whichChunk * CHUNKSIZE );
       }
 
@@ -661,9 +653,7 @@
       tivo->whichChunk = demux->filepos / CHUNKSIZE;
       readSize = stream_read( demux->stream, chunk, CHUNKSIZE );
       if ( readSize != CHUNKSIZE )
-      {
-         return( 0 );
-      }
+         return 0;
    }
    else
    {
@@ -692,9 +682,7 @@
       }
 
       if ( readSize != CHUNKSIZE )
-      {
          return 0;
-      }
    }   
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
       "\nty:actual current offset %"PRIx64"\n", stream_tell( demux->stream ) - 
@@ -1059,15 +1047,11 @@
 
       // Invalid MPEG ES Size Check
       if ( errorHeader > numberRecs / 2 )
-      {
          return 0;
-      }
 
       // Invalid MPEG Stream Type Check
       if ( invalidType > numberRecs / 2 )
-      {
          return 0;
-		}
    }
 
    demux->filepos = stream_tell( demux->stream );
@@ -1101,10 +1085,8 @@
    newpos = ( flags & 1 ) ? demuxer->movi_start : demuxer->filepos;
 	
    if( flags & 2 )
-   {
 	   // float seek 0..1
 	   newpos += ( demuxer->movi_end - demuxer->movi_start ) * rel_seek_secs;
-   } 
    else 
    {
 	   // time seek (secs)