changeset 28660:0812215421d7

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
author diego
date Sat, 21 Feb 2009 21:03:57 +0000
parents a85f4b96fc19
children 20787bd5c506
files libmpcodecs/ae_lavc.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ae_lavc.c	Sat Feb 21 20:25:02 2009 +0000
+++ b/libmpcodecs/ae_lavc.c	Sat Feb 21 21:03:57 2009 +0000
@@ -206,6 +206,8 @@
 	// 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