Commit 685c349a authored by Gildas Bazin's avatar Gildas Bazin

* src/input/decoder.c: don't forget that packetizers can output a chain of data blocks.

parent fee23a72
...@@ -585,11 +585,20 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) ...@@ -585,11 +585,20 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
while( (p_packetized_block = while( (p_packetized_block =
p_packetizer->pf_packetize( p_packetizer, &p_block )) ) p_packetizer->pf_packetize( p_packetizer, &p_block )) )
{ {
while( (p_aout_buf = while( p_packetized_block )
p_dec->pf_decode_audio( p_dec, &p_packetized_block )) ) {
block_t *p_next = p_packetized_block->p_next;
p_packetized_block->p_next = NULL;
while( (p_aout_buf = p_dec->pf_decode_audio( p_dec,
&p_packetized_block )) )
{ {
aout_DecPlay( p_dec->p_owner->p_aout, aout_DecPlay( p_dec->p_owner->p_aout,
p_dec->p_owner->p_aout_input, p_aout_buf ); p_dec->p_owner->p_aout_input,
p_aout_buf );
}
p_packetized_block = p_next;
} }
} }
} }
...@@ -611,13 +620,21 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) ...@@ -611,13 +620,21 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
while( (p_packetized_block = while( (p_packetized_block =
p_packetizer->pf_packetize( p_packetizer, &p_block )) ) p_packetizer->pf_packetize( p_packetizer, &p_block )) )
{ {
while( (p_pic = while( p_packetized_block )
p_dec->pf_decode_video( p_dec, &p_packetized_block )) ) {
block_t *p_next = p_packetized_block->p_next;
p_packetized_block->p_next = NULL;
while( (p_pic = p_dec->pf_decode_video( p_dec,
&p_packetized_block )) )
{ {
vout_DatePicture( p_dec->p_owner->p_vout, p_pic, vout_DatePicture( p_dec->p_owner->p_vout, p_pic,
p_pic->date ); p_pic->date );
vout_DisplayPicture( p_dec->p_owner->p_vout, p_pic ); vout_DisplayPicture( p_dec->p_owner->p_vout, p_pic );
} }
p_packetized_block = p_next;
}
} }
} }
else while( (p_pic = p_dec->pf_decode_video( p_dec, &p_block )) ) else while( (p_pic = p_dec->pf_decode_video( p_dec, &p_block )) )
......
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