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

reimar subversion at mplayerhq.hu
Fri Sep 14 20:50:25 CEST 2007


Author: reimar
Date: Fri Sep 14 20:50:25 2007
New Revision: 24490

Log:
Simplify IsValidAudioPacket


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 20:50:25 2007
@@ -321,28 +321,21 @@ static int IsValidAudioPacket( int size,
       {
          *ptsOffset = SERIES1_PTS_OFFSET;
          *ptsLen = SERIES1_PTS_LENGTH;
-         break;
+         return 1;
       }
    }
-   if ( *ptsOffset == 0 )
-   {
       for( count = 0 ; count < NUMBER_DIFFERENT_AUDIO_SIZES ; count++ )
       {
          if ( size == Series2AudioWithPTS[ count ] )
          {
             *ptsOffset = SERIES2_PTS_OFFSET;
             *ptsLen = SERIES2_PTS_LENGTH;
-            break;
+            return 1;
          }
       }
-   }
-   if ( *ptsOffset == 0 )
-   {
       mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Tossing Audio Packet Size %d\n", 
          size );
       return 0;
-   }
-   return 1;
 }
 
 



More information about the MPlayer-cvslog mailing list