Commit a1fc3b9f authored by Gildas Bazin's avatar Gildas Bazin

* modules/demux/dts.c: added detection for 14bits big endian and 16bits little endian bitstreams.
   (we still assume that the stream must begin with a new DTS frame, which doesn't always seem to be the case).
parent 40becaa0
......@@ -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 ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment