Set time_base to 1/samplerate, like FFmpeg does, instead of leaving it at the

default 0/1. This is not required by a lot of codecs, but at least by libvorbis.
patch by Nicolas George, nicolas.george normalesup org


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28695 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2009-02-21 21:03:57 +00:00
parent 2c48477e53
commit 35fc0ebf3f
1 changed files with 2 additions and 0 deletions

View File

@ -206,6 +206,8 @@ int mpae_init_lavc(audio_encoder_t *encoder)
// put sample parameters
lavc_actx->channels = encoder->params.channels;
lavc_actx->sample_rate = encoder->params.sample_rate;
lavc_actx->time_base.num = 1;
lavc_actx->time_base.den = encoder->params.sample_rate;
if(lavc_param_abitrate<1000)
lavc_actx->bit_rate = encoder->params.bitrate = lavc_param_abitrate * 1000;
else