Commit bec4516d authored by Laurent Aimar's avatar Laurent Aimar

* allow packetizer to return multiple blocks at once.

parent 35579492
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders * input_dec.c: Functions for the management of decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: input_dec.c,v 1.68 2003/11/16 22:23:47 gbazin Exp $ * $Id: input_dec.c,v 1.69 2003/11/18 20:34:23 fenrir Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -480,7 +480,6 @@ static int DecoderThread( decoder_t * p_dec ) ...@@ -480,7 +480,6 @@ static int DecoderThread( decoder_t * p_dec )
if( p_dec->i_object_type == VLC_OBJECT_PACKETIZER ) if( p_dec->i_object_type == VLC_OBJECT_PACKETIZER )
{ {
sout_buffer_t *p_sout_buffer;
block_t *p_sout_block; block_t *p_sout_block;
while( (p_sout_block = p_dec->pf_packetize( p_dec, &p_block )) ) while( (p_sout_block = p_dec->pf_packetize( p_dec, &p_block )) )
...@@ -515,6 +514,11 @@ static int DecoderThread( decoder_t * p_dec ) ...@@ -515,6 +514,11 @@ static int DecoderThread( decoder_t * p_dec )
} }
} }
while( p_sout_block )
{
block_t *p_next = p_sout_block->p_next;
sout_buffer_t *p_sout_buffer;
p_sout_buffer = p_sout_buffer =
sout_BufferNew( p_dec->p_owner->p_sout->p_sout, sout_BufferNew( p_dec->p_owner->p_sout->p_sout,
p_sout_block->i_buffer ); p_sout_block->i_buffer );
...@@ -534,6 +538,9 @@ static int DecoderThread( decoder_t * p_dec ) ...@@ -534,6 +538,9 @@ static int DecoderThread( decoder_t * p_dec )
block_Release( p_sout_block ); block_Release( p_sout_block );
sout_InputSendBuffer( p_dec->p_owner->p_sout, p_sout_buffer ); sout_InputSendBuffer( p_dec->p_owner->p_sout, p_sout_buffer );
p_sout_block = p_next;
}
} }
} }
else if( p_dec->fmt_in.i_cat == AUDIO_ES ) else if( p_dec->fmt_in.i_cat == AUDIO_ES )
......
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