Commit 9137b014 authored by Laurent Aimar's avatar Laurent Aimar

* all: fixed wrong usage of input_DeletePES.

parent 96fd5143
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc * avi.c : AVI file Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.31 2003/01/25 16:58:34 fenrir Exp $ * $Id: avi.c,v 1.32 2003/01/25 17:57:36 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -144,15 +144,6 @@ static int input_ReadInPES( input_thread_t *p_input, ...@@ -144,15 +144,6 @@ static int input_ReadInPES( input_thread_t *p_input,
{ {
/* should occur only with EOF and max allocation reached /* should occur only with EOF and max allocation reached
* it safer to return an error */ * it safer to return an error */
/* free all data packet */
for( p_data = p_pes->p_first; p_data != NULL; )
{
data_packet_t *p_next;
p_next = p_data->p_next;
input_DeletePacket( p_input->p_method_data, p_data );
p_data = p_next;
}
/* free pes */ /* free pes */
input_DeletePES( p_input->p_method_data, p_pes ); input_DeletePES( p_input->p_method_data, p_pes );
return -1; return -1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc * mp4.c : MP4 file input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.14 2003/01/25 17:21:40 fenrir Exp $ * $Id: mp4.c,v 1.15 2003/01/25 17:57:36 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -1162,8 +1162,13 @@ static void MP4_StartDecoder( input_thread_t *p_input, ...@@ -1162,8 +1162,13 @@ static void MP4_StartDecoder( input_thread_t *p_input,
if( !p_demux_track->p_es->p_decoder_fifo ) if( !p_demux_track->p_es->p_decoder_fifo )
{ {
msg_Warn( p_input, "cannot start decoder" ); msg_Warn( p_input, "cannot start decoder" );
if( p_pes_init )
{
input_DeletePES( p_input->p_method_data, p_pes_init );
}
return; return;
} }
if( p_pes_init != NULL ) if( p_pes_init != NULL )
{ {
input_DecodePES( p_demux_track->p_es->p_decoder_fifo, p_pes_init ); input_DecodePES( p_demux_track->p_es->p_decoder_fifo, p_pes_init );
...@@ -1242,7 +1247,6 @@ static int MP4_ReadSample( input_thread_t *p_input, ...@@ -1242,7 +1247,6 @@ static int MP4_ReadSample( input_thread_t *p_input,
if( !MP4_ReadData( p_input, p_data->p_payload_start, i_size ) ) if( !MP4_ReadData( p_input, p_data->p_payload_start, i_size ) )
{ {
input_DeletePES( p_input->p_method_data, *pp_pes ); input_DeletePES( p_input->p_method_data, *pp_pes );
input_DeletePacket( p_input->p_method_data, p_data );
return( 0 ); return( 0 );
} }
......
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