changeset 24472:9341d242f432

Reduce code duplication
author reimar
date Fri, 14 Sep 2007 18:58:32 +0000
parents 516c6a2277b1
children f8971c9855a3
files libmpdemux/demux_ty.c
diffstat 1 files changed, 2 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ty.c	Fri Sep 14 18:54:14 2007 +0000
+++ b/libmpdemux/demux_ty.c	Fri Sep 14 18:58:32 2007 +0000
@@ -938,35 +938,16 @@
 				   ( demux->filepos + offset ), tivo->lastVideoPTS );
 		}
       // ================================================================
-      // Found a 0x03 on Droid's TiVo, I have no idea what it is
-      // ================================================================
-		else if ( type == 0x03 )
-		{
-         if ( size > 0 && size + offset <= CHUNKSIZE )
-            offset += size;
-		}
-      // ================================================================
-      // Found a 0x03 on Hermit's TiVo, I have no idea what it is
-      // ================================================================
-		else if ( type == 0x03 )
-		{
-         if ( size > 0 && size + offset <= CHUNKSIZE )
-            offset += size;
-		}
-      // ================================================================
       // Unknown
       // ================================================================
-		else if ( type == 0x05 )
-		{
-         if ( size > 0 && size + offset <= CHUNKSIZE )
-            offset += size;
-		}
 		else
 		{
          if ( size > 0 && size + offset <= CHUNKSIZE )
             offset += size;
+         if (type != 3 && type != 5) {
          mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Invalid Type %x\n", type );
 			invalidType++;
+         }
 		}
      recPtr += 16;
    }