changeset 24470:656a62a00e94

Simplify IsValidAudioPacket
author reimar
date Fri, 14 Sep 2007 18:50:25 +0000
parents afbab72dbf2c
children 516c6a2277b1
files libmpdemux/demux_ty.c
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ty.c	Fri Sep 14 18:40:57 2007 +0000
+++ b/libmpdemux/demux_ty.c	Fri Sep 14 18:50:25 2007 +0000
@@ -321,28 +321,21 @@
       {
          *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;
 }