Commit 593ef6c5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Ignore frame with zero size.

This needs to be *reviewed*.
parent 0790860f
......@@ -470,7 +470,8 @@ static aout_buffer_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket )
if( p_sys->i_frame_in_packet < p_sys->p_header->frames_per_packet )
{
aout_buffer_t *p_aout_buffer;
int i_ret;
if( p_sys->p_header->frame_size == 0 )
return NULL;
p_aout_buffer =
p_dec->pf_aout_buffer_new( p_dec, p_sys->p_header->frame_size );
......@@ -479,17 +480,12 @@ static aout_buffer_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket )
return NULL;
}
i_ret = speex_decode_int( p_sys->p_state, &p_sys->bits,
(int16_t *)p_aout_buffer->p_buffer );
if( i_ret == -1 )
{
/* End of stream */
return NULL;
}
if( i_ret== -2 )
switch( speex_decode_int( p_sys->p_state, &p_sys->bits,
(int16_t *)p_aout_buffer->p_buffer ) )
{
case -2:
msg_Warn( p_dec, "decoding error: corrupted stream?" );
case -1: /* End of stream */
return NULL;
}
......
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