]> git.sesse.net Git - vlc/blobdiff - modules/demux/dts.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / demux / dts.c
index 3954b700eb83e555b859388fb164113a1c1430c2..c4ea299cdd0e75c2bb1863954fc0c6ebd90b6dbd 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * dts.c : raw DTS stream input module for vlc
  *****************************************************************************
- * Copyright (C) 2001 the VideoLAN team
+ * Copyright (C) 2001-2007 the VideoLAN team
  * $Id$
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
@@ -25,7 +25,7 @@
  * Preamble
  *****************************************************************************/
 #include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <vlc_demux.h>
 #include <vlc_codec.h>
 
 /*****************************************************************************
@@ -60,7 +60,7 @@ struct demux_sys_t
     int i_mux_rate;
 };
 
-static int CheckSync( uint8_t *p_peek );
+static int CheckSync( const uint8_t *p_peek );
 
 #define DTS_PACKET_SIZE 16384
 #define DTS_PROBE_SIZE (DTS_PACKET_SIZE * 4)
@@ -73,7 +73,7 @@ static int Open( vlc_object_t * p_this )
 {
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys;
-    byte_t *     p_peek;
+    const byte_t *p_peek;
     int          i_peek = 0;
 
     /* Check if we are dealing with a WAV file */
@@ -150,9 +150,9 @@ static int Open( vlc_object_t * p_this )
     }
 
     STANDARD_DEMUX_INIT; p_sys = p_demux->p_sys;
-   
-    INIT_PACKETIZER( 'd','t','s',' ' );
-    LOAD_PACKETIZER_OR_FAIL( "DTS" );
+    INIT_APACKETIZER( p_sys->p_packetizer, 'd','t','s',' ' );
+    LOAD_PACKETIZER_OR_FAIL( p_sys->p_packetizer, "DTS" );
 
     p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_in );
 
@@ -167,11 +167,7 @@ static void Close( vlc_object_t *p_this )
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    /* Unneed module */
-    module_Unneed( p_sys->p_packetizer, p_sys->p_packetizer->p_module );
-
-    /* Delete the decoder */
-    vlc_object_destroy( p_sys->p_packetizer );
+    DESTROY_PACKETIZER( p_sys->p_packetizer );
 
     free( p_sys );
 }
@@ -241,7 +237,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 /*****************************************************************************
  * CheckSync: Check if buffer starts with a DTS sync code
  *****************************************************************************/
-static int CheckSync( uint8_t *p_peek )
+static int CheckSync( const uint8_t *p_peek )
 {
     /* 14 bits, little endian version of the bitstream */
     if( p_peek[0] == 0xff && p_peek[1] == 0x1f &&