[MPlayer-dev-eng] [PATCH] -oac lavc: set time_base

Nicolas George nicolas.george at normalesup.org
Sat Feb 14 11:57:32 CET 2009


Hi.

ae_lavc leaves the time_base field to its default 0/1. This patch sets it to
1/samplerate, like ffmpeg does. This is not required by a lot of codecs, but
at least by one (libvorbis).

Regards,

-- 
  Nicolas George
-------------- next part --------------
Index: libmpcodecs/ae_lavc.c
===================================================================
--- libmpcodecs/ae_lavc.c	(revision 28552)
+++ libmpcodecs/ae_lavc.c	(working copy)
@@ -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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090214/938cc186/attachment.pgp>


More information about the MPlayer-dev-eng mailing list