]> git.sesse.net Git - vlc/blobdiff - modules/codec/dts.c
* Coding style cleanup: removed tabs and trailing spaces.
[vlc] / modules / codec / dts.c
index 982f013fb75d194b36684dce48112c67b09411a2..4524de8158a63becedb567bf9c07b8a73a4eb0e4 100644 (file)
@@ -2,7 +2,7 @@
  * dts.c: parse DTS audio sync info and packetize the stream
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: dts.c,v 1.6 2003/11/16 22:54:12 gbazin Exp $
+ * $Id: dts.c,v 1.9 2003/12/22 14:32:55 sam Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Gildas Bazin <gbazin@netcourrier.com>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>                                              /* memcpy() */
-
 #include <vlc/vlc.h>
 #include <vlc/decoder.h>
-#include <vlc/input.h>
 
 #include "vlc_block_helper.h"
 
@@ -263,11 +258,12 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 return NULL;
             }
 
-            if( p_header[0] == 0x7f && p_header[1] == 0xfe &&
-                p_header[2] == 0x80 && p_header[3] == 0x01 )
+            if( p_header[0] != 0x7f || p_header[1] != 0xfe ||
+                p_header[2] != 0x80 || p_header[3] != 0x01 )
             {
                 msg_Dbg( p_dec, "emulated sync word "
-                         "(no sync on following frame)" );
+                         "(no sync on following frame) %2.2x%2.2x%2.2x%2.2x",
+                         p_header[0], p_header[1], p_header[2], p_header[3] );
                 p_sys->i_state = STATE_NOSYNC;
                 block_SkipByte( &p_sys->bytestream );
                 break;
@@ -550,7 +546,7 @@ static int SyncInfo( const byte_t * p_buf,
             {
                 /* User defined */
                 *pi_channels = 0;
-                *pi_channels_conf = 0; 
+                *pi_channels_conf = 0;
             }
             else
             {
@@ -577,5 +573,5 @@ static int SyncInfo( const byte_t * p_buf,
 
     *pi_frame_length = (i_frame_length + 1) * 32;
 
-    return( i_frame_size + 1 );
+    return i_frame_size + 1;
 }