Commit bc3dd56d authored by Rafaël Carré's avatar Rafaël Carré

transcode: try FI32 as intermediate format

Some formats can only be converted to FI32, and then
a FI32->FL32 converter can be used.
parent 8494d6cd
...@@ -114,8 +114,25 @@ static int transcode_audio_filter_chain_build( sout_stream_t *p_stream, filter_c ...@@ -114,8 +114,25 @@ static int transcode_audio_filter_chain_build( sout_stream_t *p_stream, filter_c
if( !filter_chain_AppendFilter( p_chain, NULL, NULL, NULL, &current ) ) if( !filter_chain_AppendFilter( p_chain, NULL, NULL, NULL, &current ) )
{ {
msg_Err( p_stream, "Failed to find conversion filter to fl32" ); /* If that fails, try going through fi32 */
return VLC_EGENERIC; current.i_codec =
current.audio.i_format = VLC_CODEC_FI32;
aout_FormatPrepare( &current.audio );
if( !filter_chain_AppendFilter( p_chain, NULL, NULL, NULL, &current ) )
{
msg_Err( p_stream, "Failed to find conversion filter to fi32" );
return VLC_EGENERIC;
}
current = *filter_chain_GetFmtOut( p_chain );
current.i_codec =
current.audio.i_format = VLC_CODEC_FL32;
aout_FormatPrepare( &current.audio );
if( !filter_chain_AppendFilter( p_chain, NULL, NULL, NULL, &current ) )
{
msg_Err( p_stream, "Failed to find conversion filter to fl32" );
return VLC_EGENERIC;
}
} }
current = *filter_chain_GetFmtOut( p_chain ); current = *filter_chain_GetFmtOut( p_chain );
} }
......
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