Commit da011cf4 authored by Stéphane Borel's avatar Stéphane Borel

-fixed a segfault added in last commit: initilisation of p_cache was

done inside a #ifdef DEBUG

It still segfaults for me on exit.
parent 3d727062
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management * input_ps.c: PS demux and packet management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ps.c,v 1.18 2001/04/27 19:29:11 massiot Exp $ * $Id: input_ps.c,v 1.19 2001/04/27 23:29:14 stef Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -547,8 +547,10 @@ static struct data_packet_s * NewPacket( void * p_packet_cache, ...@@ -547,8 +547,10 @@ static struct data_packet_s * NewPacket( void * p_packet_cache,
data_packet_t * p_data; data_packet_t * p_data;
long l_index; long l_index;
p_cache = (packet_cache_t *)p_packet_cache;
#ifdef DEBUG #ifdef DEBUG
if ( (p_cache = (packet_cache_t *)p_packet_cache) == NULL ) if ( p_cache == NULL )
{ {
intf_ErrMsg( "PPacket cache not initialized" ); intf_ErrMsg( "PPacket cache not initialized" );
return NULL; return NULL;
...@@ -692,8 +694,10 @@ static pes_packet_t * NewPES( void * p_packet_cache ) ...@@ -692,8 +694,10 @@ static pes_packet_t * NewPES( void * p_packet_cache )
packet_cache_t * p_cache; packet_cache_t * p_cache;
pes_packet_t * p_pes; pes_packet_t * p_pes;
p_cache = (packet_cache_t *)p_packet_cache;
#ifdef DEBUG #ifdef DEBUG
if ( (p_cache = (packet_cache_t *)p_packet_cache) == NULL ) if ( p_cache == NULL )
{ {
intf_ErrMsg( "Packet cache not initialized" ); intf_ErrMsg( "Packet cache not initialized" );
return NULL; return NULL;
...@@ -741,8 +745,10 @@ static void DeletePacket( void * p_packet_cache, ...@@ -741,8 +745,10 @@ static void DeletePacket( void * p_packet_cache,
{ {
packet_cache_t * p_cache; packet_cache_t * p_cache;
p_cache = (packet_cache_t *)p_packet_cache;
#ifdef DEBUG #ifdef DEBUG
if ( (p_cache = (packet_cache_t *)p_packet_cache) == NULL ) if ( p_cache == NULL )
{ {
intf_ErrMsg( "Packet cache not initialized" ); intf_ErrMsg( "Packet cache not initialized" );
return; return;
...@@ -817,8 +823,10 @@ static void DeletePES( void * p_packet_cache, pes_packet_t * p_pes ) ...@@ -817,8 +823,10 @@ static void DeletePES( void * p_packet_cache, pes_packet_t * p_pes )
data_packet_t * p_data; data_packet_t * p_data;
data_packet_t * p_next; data_packet_t * p_next;
p_cache = (packet_cache_t *)p_packet_cache;
#ifdef DEBUG #ifdef DEBUG
if ( (p_cache = (packet_cache_t *)p_packet_cache) == NULL ) if ( p_cache == NULL )
{ {
intf_ErrMsg( "Packet cache not initialized" ); intf_ErrMsg( "Packet cache not initialized" );
return; return;
......
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