]> git.sesse.net Git - vlc/commitdiff
* modules/demux/dts.c: added detection for 14bits big endian and 16bits little endian...
authorGildas Bazin <gbazin@videolan.org>
Tue, 3 Feb 2004 08:16:16 +0000 (08:16 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 3 Feb 2004 08:16:16 +0000 (08:16 +0000)
   (we still assume that the stream must begin with a new DTS frame, which doesn't always seem to be the case).

modules/demux/dts.c

index c264297ee464a7b16763495bf1e5ed9d8201bffd..77e40eb4718d742258bb649596dafbc8c5d5c1ce 100644 (file)
@@ -2,7 +2,7 @@
  * dts.c : raw DTS stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: dts.c,v 1.2 2004/01/21 17:56:05 gbazin Exp $
+ * $Id: dts.c,v 1.3 2004/02/03 08:16:16 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -99,11 +99,22 @@ static int Open( vlc_object_t * p_this )
         (p_peek[i_peek + 4] & 0xf0) == 0xf0 && p_peek[i_peek + 5] == 0x07 )
     {
     }
+    /* 14 bits, big endian version of the bitstream */
+    else if( p_peek[i_peek + 0] == 0x1f && p_peek[i_peek + 1] == 0xff &&
+             p_peek[i_peek + 2] == 0xe8 && p_peek[i_peek + 3] == 0x00 &&
+             p_peek[i_peek + 4] == 0x07 && (p_peek[i_peek + 5] & 0xf0) == 0xf0)
+    {
+    }
     /* 16 bits, big endian version of the bitstream */
     else if( p_peek[i_peek + 0] == 0x7f && p_peek[i_peek + 1] == 0xfe &&
              p_peek[i_peek + 2] == 0x80 && p_peek[i_peek + 3] == 0x01 )
     {
     }
+    /* 16 bits, little endian version of the bitstream */
+    else if( p_peek[i_peek + 0] == 0xfe && p_peek[i_peek + 1] == 0x7f &&
+             p_peek[i_peek + 2] == 0x01 && p_peek[i_peek + 3] == 0x80 )
+    {
+    }
     else
     {
         if( p_input->psz_demux && !strncmp( p_input->psz_demux, "dts", 3 ) )