# include "config.h"
#endif
-#include <assert.h>
-
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_input.h>
#include <vlc_codec.h>
#include <vlc_aout.h>
-#include <vlc_memory.h>
#include <ogg/ogg.h>
#include <speex/speex.h>
{
uint8_t *p_extra;
- p_dec->fmt_in.p_extra = realloc_or_free( p_dec->fmt_in.p_extra,
+ p_dec->fmt_in.p_extra = xrealloc( p_dec->fmt_in.p_extra,
p_dec->fmt_in.i_extra + oggpacket.bytes + 2 );
- assert( p_dec->fmt_in.p_extra );
p_extra = ((uint8_t *)p_dec->fmt_in.p_extra) + p_dec->fmt_in.i_extra;
*(p_extra++) = oggpacket.bytes >> 8;
*(p_extra++) = oggpacket.bytes & 0xFF;
if( p_sys->b_packetizer )
{
p_dec->fmt_out.i_extra = p_dec->fmt_in.i_extra;
- p_dec->fmt_out.p_extra = realloc_or_free( p_dec->fmt_out.p_extra,
+ p_dec->fmt_out.p_extra = xrealloc( p_dec->fmt_out.p_extra,
p_dec->fmt_out.i_extra );
- assert( p_dec->fmt_out.p_extra );
memcpy( p_dec->fmt_out.p_extra,
p_dec->fmt_in.p_extra, p_dec->fmt_out.i_extra );
}
block_t *p_new_block = NULL;
i_pcm_output_size = p_sys->p_header->frame_size;
- p_frame_holder = (short*)malloc( sizeof(short)*i_pcm_output_size );
- assert( p_frame_holder );
+ p_frame_holder = (short*)xmalloc( sizeof(short)*i_pcm_output_size );
speex_bits_read_from( &p_sys->bits, (char*)p_oggpacket->packet,
p_oggpacket->bytes);
p_sys->i_frame_size = p_sys->i_frame_length *
sizeof(int16_t) * p_enc->fmt_in.audio.i_channels;
- p_sys->p_buffer = malloc( p_sys->i_frame_size );
- assert( p_sys->p_buffer );
+ p_sys->p_buffer = xmalloc( p_sys->i_frame_size );
/* Create and store headers */
pp_header[0] = speex_header_to_packet( &p_sys->header, &pi_header[0] );
pi_header[1] = sizeof("ENCODER=VLC media player");
p_enc->fmt_out.i_extra = 3 * 2 + pi_header[0] + pi_header[1];
- p_extra = p_enc->fmt_out.p_extra = malloc( p_enc->fmt_out.i_extra );
- assert( p_extra );
+ p_extra = p_enc->fmt_out.p_extra = xmalloc( p_enc->fmt_out.i_extra );
for( i = 0; i < 2; i++ )
{
*(p_extra++) = pi_header[i] >> 8;