Commit 95e0fbfb authored by md's avatar md

* demux.c: Make sure we reset CAM if it outputs garbage (invalid PES headers)


git-svn-id: svn://svn.videolan.org/dvblast/trunk@88 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent c87a6dca
......@@ -255,12 +255,13 @@ static void demux_Handle( block_t *p_ts )
output_t *p_output = p_pids[i_pid].pp_outputs[i];
if ( p_output != NULL )
{
if ( i_ca_handle && (p_output->i_config & OUTPUT_WATCH) )
if ( i_ca_handle && (p_output->i_config & OUTPUT_WATCH) &&
block_UnitStart( p_ts ) )
{
uint8_t *p_payload;
if ( block_GetScrambling( p_ts ) ||
( block_UnitStart( p_ts ) && p_pids[i_pid].b_pes
( p_pids[i_pid].b_pes
&& (p_payload = block_GetPayload( p_ts )) != NULL
&& p_payload + 3 < p_ts->p_ts + TS_SIZE
&& (p_payload[0] != 0 || p_payload[1] != 0
......
......@@ -32,7 +32,7 @@
#define EMPTY_PID 8192
#define PADDING_PID 8191
#define WATCHDOG_WAIT 10000000LL
#define MAX_ERRORS 100000
#define MAX_ERRORS 1000
#define DEFAULT_VERBOSITY 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