[MPlayer-cvslog] r24527 - trunk/libmpdemux/demux_ty.c

reimar subversion at mplayerhq.hu
Sat Sep 15 15:25:56 CEST 2007


Author: reimar
Date: Sat Sep 15 15:25:56 2007
New Revision: 24527

Log:
Avoid one more code duplication


Modified:
   trunk/libmpdemux/demux_ty.c

Modified: trunk/libmpdemux/demux_ty.c
==============================================================================
--- trunk/libmpdemux/demux_ty.c	(original)
+++ trunk/libmpdemux/demux_ty.c	Sat Sep 15 15:25:56 2007
@@ -465,6 +465,7 @@ static int demux_ty_fill_buffer( demuxer
          return 0;
    }
 
+   do {
    if ( tivo->tmf != 1 )
    {
       // Make sure we are on a 128k boundary
@@ -489,25 +490,10 @@ static int demux_ty_fill_buffer( demuxer
          return 0;
       tivo->whichChunk++;
    }
-
-   // We found a part header, skip it
-   if( AV_RB32(chunk) == TIVO_PES_FILEID )
-   {
+   if (AV_RB32(chunk) == TIVO_PES_FILEID)
       mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Skipping PART Header\n" );
-      if ( tivo->tmf != 1 )
-      {
-         demux->filepos = stream_tell( demux->stream );
-         readSize = stream_read( demux->stream, chunk, CHUNKSIZE );
-      }
-      else
-      {
-         readSize = tmf_load_chunk( demux, tivo, chunk, tivo->whichChunk );
-         tivo->whichChunk++;
-      }
+   } while (AV_RB32(chunk) == TIVO_PES_FILEID);
 
-      if ( readSize != CHUNKSIZE )
-         return 0;
-   }
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
       "\nty:actual current offset %"PRIx64"\n", stream_tell( demux->stream ) -
       CHUNKSIZE );



More information about the MPlayer-cvslog mailing list