/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
#include <vlc/vlc.h>
#include <vlc_input.h>
#include <vlc_sout.h>
#include <vlc_filter.h>
#include <vlc_osd.h>
+#include <math.h>
+
#define MASTER_SYNC_MAX_DRIFT 100000
/* FIXME Ugly */
#define HURRYUP_LONGTEXT N_( "The transcoder will drop frames if your CPU " \
"can't keep up with the encoding rate." )
-static char *ppsz_deinterlace_type[] =
+static const char *ppsz_deinterlace_type[] =
{
"deinterlace", "ffmpeg-deinterlace"
};
sout_StreamDelete( p_sys->p_out );
+ while( p_sys->i_afilters )
+ {
+ p_sys->i_afilters--;
+ if( p_sys->psz_afilters[p_sys->i_afilters] )
+ free( p_sys->psz_afilters[p_sys->i_afilters] );
+ if( p_sys->p_afilters_cfg[p_sys->i_afilters] )
+ free( p_sys->p_afilters_cfg[p_sys->i_afilters] );
+ }
+
while( p_sys->p_audio_cfg != NULL )
{
config_chain_t *p_next = p_sys->p_audio_cfg->p_next;
}
if( p_sys->psz_aenc ) free( p_sys->psz_aenc );
+ while( p_sys->i_vfilters )
+ {
+ p_sys->i_vfilters--;
+ if( p_sys->psz_vfilters[p_sys->i_vfilters] )
+ free( p_sys->psz_vfilters[p_sys->i_vfilters] );
+ if( p_sys->p_vfilters_cfg[p_sys->i_vfilters] )
+ free( p_sys->p_vfilters_cfg[p_sys->i_vfilters] );
+ }
+
while( p_sys->p_video_cfg != NULL )
{
config_chain_t *p_next = p_sys->p_video_cfg->p_next;
msg_Err( p_stream, "cannot find decoder" );
return VLC_EGENERIC;
}
- id->p_decoder->fmt_out.audio.i_bitspersample =
+ id->p_decoder->fmt_out.audio.i_bitspersample =
audio_BitsPerSample( id->p_decoder->fmt_out.i_codec );
fmt_last = id->p_decoder->fmt_out;
/* Fix AAC SBR changing number of channels and sampling rate */