Commit e63e4c99 authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Anton Khirnov

vsrc_color: use internal timebase

Avoid timescale conversion, simplify.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 57fa3140
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment