* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.16 2000/12/22 13:04:45 sam Exp $
+ * $Id: mpeg_system.c,v 1.17 2000/12/22 15:00:42 sam Exp $
*
* Authors:
*
if( (*p_byte & 0xC0) == 0x40 )
{
/* Don't ask why... --Meuuh */
+ /* Erm... why ? --Sam */
p_byte += 2;
i_pes_header_size += 2;
if( p_byte >= p_data->p_payload_end )
break;
}
- if( p_es->i_stream_id == 0xBC )
+ if( p_es->i_stream_id == 0xbd )
{
/* With private stream 1, the first byte of the payload
* is a stream_private_id, so skip it. */
//intf_DbgMsg("PES-demultiplexing %p (%p)", p_ts_packet, p_pes);
- /* If we lost data, insert an NULL data packet (philosophy : 0 is quite
+ /* If we lost data, insert a NULL data packet (philosophy : 0 is quite
* often an escape sequence in decoders, so that should make them wait
* for the next start code). */
if( b_packet_lost || p_es->b_discontinuity )
if( p[5] & 0x80 )
{
intf_WarnMsg( 2,
- "discontinuity_indicator" \
- " encountered by TS demux (position read: %d," \
+ "discontinuity_indicator"
+ " encountered by TS demux (position read: %d,"
" saved: %d)",
p[5] & 0x80, p_es_demux->i_continuity_counter );
{
if( !b_payload && i_dummy == 0 )
{
- /* This is a packet without payload, this is allowed by the draft.
- * As there is nothing interesting in this packet (except PCR that
- * have already been handled), we can trash the packet. */
+ /* This is a packet without payload, this is allowed by the
+ * draft. As there is nothing interesting in this packet
+ * (except PCR that have already been handled), we can trash
+ * the packet. */
intf_WarnMsg( 1,
"Packet without payload received by TS demux" );
b_trash = 1;
}
else if( p_es_demux->i_continuity_counter == 0xFF )
{
- /* This means that the packet is the first one we receive for this
- * ES since the continuity counter ranges between 0 and 0x0F
- * excepts when it has been initialized by the input: Init the
- * counter to the correct value. */
+ /* This means that the packet is the first one we receive for
+ * this ES since the continuity counter ranges between 0 and
+ * 0x0F excepts when it has been initialized by the input:
+ * init the counter to the correct value. */
intf_DbgMsg( "First packet for PID %d received by TS demux",
p_es->i_id );
p_es_demux->i_continuity_counter = (p[3] & 0x0f);
else
{
/* This can indicate that we missed a packet or that the
- * continuity_counter wrapped and we received a dup packet: as we
- * don't know, do as if we missed a packet to be sure to recover
- * from this situation */
+ * continuity_counter wrapped and we received a dup packet:
+ * as we don't know, do as if we missed a packet to be sure
+ * to recover from this situation */
intf_WarnMsg( 2,
"Packet lost by TS demux: current %d, packet %d",
p_es_demux->i_continuity_counter & 0x0f,