- do
- {
- input_ExtractPES( p_adec->p_fifo, &p_pes );
- if( !p_pes )
- {
- p_adec->p_fifo->b_error = 1;
- return;
- }
- p_adec->pts = p_pes->i_pts;
- i_frame_size = p_pes->i_pes_size;
-
- if( i_frame_size > 0 )
- {
- if( p_adec->i_buffer_size < i_frame_size + 16 )
- {
- FREE( p_adec->p_buffer );
- p_adec->p_buffer = malloc( i_frame_size + 16 );
- p_adec->i_buffer_size = i_frame_size + 16;
- }
-
- E_( GetPESData )( p_adec->p_buffer, p_adec->i_buffer_size, p_pes );
- }
- input_DeletePES( p_adec->p_fifo->p_packets_mgt, p_pes );
- } while( i_frame_size <= 0 );
-
-
- i_status = avcodec_decode_audio( p_adec->p_context,
- (s16*)p_adec->p_output,
- &i_output_size,
- p_adec->p_buffer,
- i_frame_size );
- if( i_status < 0 )