[vlc-commits] avcodec: set encoding sample format correctly and don't assume S16N
Ilkka Ollakka
git at videolan.org
Thu Mar 7 10:50:19 CET 2013
vlc/vlc-2.0 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Dec 29 09:37:34 2012 +0200| [b822ec7728e5eed84f12df9734af92521c82cf52] | committer: 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: Ilkka Ollakka <ileoo at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=b822ec7728e5eed84f12df9734af92521c82cf52
---
modules/codec/avcodec/encoder.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index cd66623..43e53ab 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -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;
More information about the vlc-commits
mailing list