You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavfi: add link.current_pts field.
This commit is contained in:
@@ -238,6 +238,7 @@ int avfilter_config_links(AVFilterContext *filter)
|
||||
}
|
||||
|
||||
inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL;
|
||||
link->current_pts =
|
||||
link->current_pts_us = AV_NOPTS_VALUE;
|
||||
|
||||
switch (link->init_state) {
|
||||
@@ -443,6 +444,7 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts)
|
||||
{
|
||||
if (pts == AV_NOPTS_VALUE)
|
||||
return;
|
||||
link->current_pts = pts;
|
||||
link->current_pts_us = av_rescale_q(pts, link->time_base, AV_TIME_BASE_Q);
|
||||
/* TODO use duration */
|
||||
if (link->graph && link->age_index >= 0)
|
||||
|
@@ -433,6 +433,12 @@ struct AVFilterLink {
|
||||
*/
|
||||
struct AVFilterGraph *graph;
|
||||
|
||||
/**
|
||||
* Current timestamp of the link, as defined by the most recent
|
||||
* frame(s), in link time_base units.
|
||||
*/
|
||||
int64_t current_pts;
|
||||
|
||||
/**
|
||||
* Current timestamp of the link, as defined by the most recent
|
||||
* frame(s), in AV_TIME_BASE units.
|
||||
|
Reference in New Issue
Block a user