Commit 3c5c0460 authored by dionoea's avatar dionoea
Browse files

This should fix audio transcoding. (unfortunately I have some issues

a bit later ... but at least it gives a starting point for people
wanting to have fun with transcode / audio / filter chains)
parent 6d004778
......@@ -1215,7 +1215,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
audio_BitsPerSample( id->p_encoder->fmt_in.i_codec );
/* Init filter chain */
id->p_f_chain = filter_chain_New( p_stream, "audio filter2", false,
id->p_f_chain = filter_chain_New( p_stream, "audio filter2", true,
transcode_audio_filter_allocation_init, NULL, NULL );
filter_chain_Reset( id->p_f_chain, &fmt_last, &id->p_encoder->fmt_in );
......@@ -1230,6 +1230,20 @@ static int transcode_audio_new( sout_stream_t *p_stream,
fmt_last = fmt_out;
}
/* FIXME: same comment as in "#if 0"ed code */
int i;
for( i = 0; i < 4; i++ )
{
if( (fmt_last.audio.i_channels !=
id->p_encoder->fmt_in.audio.i_channels) ||
(fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate) ||
(fmt_last.i_codec != id->p_encoder->fmt_in.i_codec) )
{
filter_chain_AppendFilter( id->p_f_chain, NULL, NULL, &fmt_last, &id->p_encoder->fmt_in );
fmt_last = *filter_chain_GetFmtOut( id->p_f_chain );
}
}
#if 0
/* FIXME FIXME FIXME WHAT DOES THIS CODE DO? LOOKS LIKE IT'S RANDOMLY TRYING
TO CHAIN A BUNCH OF AUDIO FILTERS */
......
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