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