Commit 1fbde99a authored by Rafaël Carré's avatar Rafaël Carré

When specifying --sout-transcode-samplerate and --sout-transcode-channel, set...

When specifying --sout-transcode-samplerate and --sout-transcode-channel, set the OUTPUT format instead of the INPUT

Fix resampling when using mp4a (faac is the only option atm)
parent 1fcb9d86
......@@ -539,8 +539,15 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
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;
p_context->sample_rate = p_enc->fmt_out.audio.i_rate;
p_context->channels = p_enc->fmt_out.audio.i_channels;
if ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') )
{
/* XXX: FAAC does resample only when setting the INPUT samplerate
* to the desired value (-R option of the faac frontend) */
p_enc->fmt_in.audio.i_rate = p_context->sample_rate;
}
}
/* Misc parameters */
......
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