Commit decac965 authored by Christophe Massiot's avatar Christophe Massiot

* modules/demux/mpeg/system.c: check for scrambled packets.

parent 0441ed4b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* system.c: helper module for TS, PS and PES management * system.c: helper module for TS, PS and PES management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2004 VideoLAN * Copyright (C) 1998-2004 VideoLAN
* $Id: system.c,v 1.30 2004/01/25 20:05:28 hartman Exp $ * $Id: system.c,v 1.31 2004/02/20 17:16:50 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr> * Michel Lespinasse <walken@via.ecp.fr>
...@@ -1240,6 +1240,7 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data, ...@@ -1240,6 +1240,7 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data,
vlc_bool_t b_psi = 0; /* Is this a PSI ? */ vlc_bool_t b_psi = 0; /* Is this a PSI ? */
vlc_bool_t b_dvbsub = 0; /* Is this a dvb subtitle ? */ vlc_bool_t b_dvbsub = 0; /* Is this a dvb subtitle ? */
vlc_bool_t b_pcr = 0; /* Does it have a PCR ? */ vlc_bool_t b_pcr = 0; /* Does it have a PCR ? */
vlc_bool_t b_scrambled;
es_descriptor_t * p_es = NULL; es_descriptor_t * p_es = NULL;
es_ts_data_t * p_es_demux = NULL; es_ts_data_t * p_es_demux = NULL;
pgrm_ts_data_t * p_pgrm_demux = NULL; pgrm_ts_data_t * p_pgrm_demux = NULL;
...@@ -1250,6 +1251,7 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data, ...@@ -1250,6 +1251,7 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data,
/* Extract flags values from TS common header. */ /* Extract flags values from TS common header. */
i_pid = ((p[1] & 0x1F) << 8) | p[2]; i_pid = ((p[1] & 0x1F) << 8) | p[2];
b_unit_start = (p[1] & 0x40); b_unit_start = (p[1] & 0x40);
b_scrambled = (p[3] & 0xc0);
b_adaptation = (p[3] & 0x20); b_adaptation = (p[3] & 0x20);
b_payload = (p[3] & 0x10); b_payload = (p[3] & 0x10);
...@@ -1303,6 +1305,11 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data, ...@@ -1303,6 +1305,11 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data,
{ {
b_trash = 1; b_trash = 1;
} }
else if( b_scrambled )
{
msg_Warn( p_input, "scrambled packet for PID %d counter %x", i_pid, p[3] & 0x0f );
b_trash = 1;
}
vlc_mutex_unlock( &p_input->stream.control.control_lock ); vlc_mutex_unlock( &p_input->stream.control.control_lock );
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
......
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