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

Clément Bœsch ubitux at gmail.com
Fri Oct 26 19:15:41 CEST 2012


---
 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;
 #if _XOPEN_SOURCE
         tzset();
         now += timezone;
-- 
1.8.0



More information about the ffmpeg-devel mailing list