[vlc-commits] avcodec: set encoding sample format correctly and don't assume S16N
Ilkka Ollakka
git at videolan.org
Sun Dec 30 13:13:03 CET 2012
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Dec 29 09:37:34 2012 +0200| [d00fe8ac34d626a5e24d1c8b2e564b5364c62136] | committer: Ilkka Ollakka
avcodec: set encoding sample format correctly and don't assume S16N
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d00fe8ac34d626a5e24d1c8b2e564b5364c62136
---
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 0f0f169..0517e82 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -595,7 +595,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