Commit 3cc971d2 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/encoder.c, modules/stream_out/transcode.c: cosmetic fixes.

parent 1e9df876
......@@ -440,6 +440,10 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
}
else if( p_enc->fmt_in.i_cat == AUDIO_ES )
{
/* work around bug in libmp3lame encoding */
if( i_codec_id == CODEC_ID_MP3 && p_enc->fmt_in.audio.i_channels > 2 )
p_enc->fmt_in.audio.i_channels = 2;
p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
p_context->sample_rate = p_enc->fmt_in.audio.i_rate;
p_context->channels = p_enc->fmt_in.audio.i_channels;
......
......@@ -370,13 +370,6 @@ static int Open( vlc_object_t *p_this )
if( p_sys->i_acodec )
{
if ( ( strncmp( (char *)&p_sys->i_acodec, "mp3", 3) == 0 ) &&
( p_sys->i_channels > 2 ) )
{
msg_Warn( p_stream, "%d channels invalid for mp3, forcing to 2",
p_sys->i_channels);
p_sys->i_channels = 2;
}
msg_Dbg( p_stream, "codec audio=%4.4s %dHz %d channels %dKb/s",
(char *)&p_sys->i_acodec, p_sys->i_sample_rate,
p_sys->i_channels, p_sys->i_abitrate / 1000 );
......@@ -470,7 +463,7 @@ static int Open( vlc_object_t *p_this )
if( p_sys->i_scodec )
{
msg_Dbg( p_stream, "codec spu=%4.4s", (char *)&p_sys->i_acodec );
msg_Dbg( p_stream, "codec spu=%4.4s", (char *)&p_sys->i_scodec );
}
var_Get( p_stream, SOUT_CFG_PREFIX "soverlay", &val );
......
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