Commit b822ec77 authored by Ilkka Ollakka's avatar Ilkka Ollakka

avcodec: set encoding sample format correctly and don't assume S16N

(cherry picked from commit d00fe8ac34d626a5e24d1c8b2e564b5364c62136)

ref #8265 and possibly ref #8183
Signed-off-by: default avatarIlkka Ollakka <ileoo@videolan.org>
parent 22b3452a
......@@ -650,7 +650,8 @@ int OpenEncoder( vlc_object_t *p_this )
p_context->sample_fmt = p_codec->sample_fmts ?
p_codec->sample_fmts[0] :
AV_SAMPLE_FMT_S16;
p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
p_enc->fmt_in.i_codec = GetVlcAudioFormat( p_context->sample_fmt );
p_context->sample_rate = p_enc->fmt_out.audio.i_rate;
p_context->time_base.num = 1;
p_context->time_base.den = p_context->sample_rate;
......
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