[FFmpeg-devel] [PATCH 3/3] lavfi/drawtext: use AV_TIME_BASE instead of hardcoded value.

Michael Niedermayer michaelni at gmx.at
Tue Oct 30 21:07:02 CET 2012


On Fri, Oct 26, 2012 at 07:15:41PM +0200, Clément Bœsch wrote:
> ---
>  libavfilter/vf_drawtext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> index 7653d5d..deb5c10 100644
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -641,7 +641,7 @@ static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
>      int buf_size = dtext->expanded_text_size;
>  
>      if (dtext->basetime != AV_NOPTS_VALUE) {
> -        now= picref->pts*av_q2d(ctx->inputs[0]->time_base) + dtext->basetime/1000000;
> +        now = picref->pts*av_q2d(ctx->inputs[0]->time_base) + dtext->basetime/AV_TIME_BASE;

I think its better if a command line option is in micro sec instead of in
units of a ffmpeg API related constant

also this looks like the useable precission is just seconds on the
basetime option is just seconds

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121030/5a627412/attachment.asc>


More information about the ffmpeg-devel mailing list