[FFmpeg-cvslog] vsrc_color: use internal timebase

Stefano Sabatini git at videolan.org
Thu Sep 29 01:19:12 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Jun 18 01:52:40 2011 +0200| [e63e4c99c9de88b6765911da85e49e7e3be91bf0] | committer: Anton Khirnov

vsrc_color: use internal timebase

Avoid timescale conversion, simplify.

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e63e4c99c9de88b6765911da85e49e7e3be91bf0
---

 libavfilter/vsrc_color.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index 1248ffd..94b5a29 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -130,6 +130,7 @@ static int color_config_props(AVFilterLink *inlink)
            is_packed_rgba ? "rgba" : "yuva");
     inlink->w = color->w;
     inlink->h = color->h;
+    inlink->time_base = color->time_base;
 
     return 0;
 }
@@ -139,7 +140,7 @@ static int color_request_frame(AVFilterLink *link)
     ColorContext *color = link->src->priv;
     AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h);
     picref->video->pixel_aspect = (AVRational) {1, 1};
-    picref->pts                 = av_rescale_q(color->pts++, color->time_base, AV_TIME_BASE_Q);
+    picref->pts                 = color->pts++;
     picref->pos                 = -1;
 
     avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0));



More information about the ffmpeg-cvslog mailing list