* system.c: helper module for TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: system.c,v 1.21 2003/11/24 03:30:38 fenrir Exp $
+ * $Id: system.c,v 1.26 2003/12/22 14:32:56 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
* BenoƮt Steiner <benny@via.ecp.fr>
- * Samuel Hocevar <sam@zoy.org>
+ * Sam Hocevar <sam@zoy.org>
* Henri Fallon <henri@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
if( (p_header[0] || p_header[1] || (p_header[2] != 1)) )
{
/* packet_start_code_prefix != 0x000001 */
- msg_Err( p_input, "data loss, PES packet does not start with 000001" );
+ msg_Warn( p_input, "data loss, PES packet does not start with 000001" );
input_DeletePES( p_input->p_method_data, p_pes );
p_pes = NULL;
}
}
if( i_pes_header_size == 23 )
{
- msg_Err( p_input, "too much MPEG-1 stuffing" );
+ msg_Warn( p_input, "too much MPEG-1 stuffing" );
input_DeletePES( p_input->p_method_data, p_pes );
p_pes = NULL;
return;
}
/* Welcome to the kludge area ! --Meuuh */
- if ( p_es->i_fourcc == VLC_FOURCC('a','5','2','b') )
+ if ( p_es->i_fourcc == VLC_FOURCC('a','5','2','b')
+ || p_es->i_fourcc == VLC_FOURCC('d','t','s','b') )
{
- /* With A/52 audio, we need to skip the first 4 bytes */
+ /* With A/52 or DTS audio, we need to skip the first 4 bytes */
i_pes_header_size += 4;
}
if ( p_es->i_fourcc == VLC_FOURCC('l','p','c','b')
|| p_es->i_fourcc == VLC_FOURCC('s','p','u','b')
- || p_es->i_fourcc == VLC_FOURCC('d','t','s','b')
|| p_es->i_fourcc == VLC_FOURCC('s','d','d','b') )
{
/* stream_private_id */
/* Go to the next data packet. */
if( (p_data = p_data->p_next) == NULL )
{
- msg_Err( p_input, "PES header bigger than payload" );
+ msg_Warn( p_input, "PES header bigger than payload" );
input_DeletePES( p_input->p_method_data, p_pes );
p_pes = NULL;
return;
/* This last packet is partly header, partly payload. */
if( i_payload_size < i_pes_header_size )
{
- msg_Err( p_input, "PES header bigger than payload" );
+ msg_Warn( p_input, "PES header bigger than payload" );
input_DeletePES( p_input->p_method_data, p_pes );
p_pes = NULL;
return;
i_fourcc = VLC_FOURCC('l','p','c','b');
i_cat = AUDIO_ES;
}
+ else if( (i_id & 0xFFFF) == 0x70BD )
+ {
+ /* SVCD OGT subtitles in stream 0x070 */
+ i_fourcc = VLC_FOURCC('o','g','t', ' ');
+ i_cat = SPU_ES;
+#ifdef FINISHED_DEBUGGING
+ if( !p_input->stream.b_seekable )
+ if( config_GetInt( p_input, "spu-channel" )
+ == ((i_id & 0x0300) >> 8) )
+#endif
+ {
+ b_auto_spawn = VLC_TRUE;
+ }
+ }
+ else if( ((i_id >> 8) & 0xFF) <= 0x03 &&
+ (i_id & 0x00FF) == 0x00BD )
+ {
+ /* CVD subtitles (0x00->0x03) */
+ i_fourcc = VLC_FOURCC('c','v','d', ' ');
+ i_cat = SPU_ES;
+ msg_Warn( p_input,
+ "CVD subtitles not implemented yet" );
+ }
else
{
i_cat = UNKNOWN_ES;