This field is used for fast comparison between link ages, it is in AV_TIME_BASE units, in other words microseconds, µs =~ us. Renaming it allows a second field in link time base units.
Unified · Split
| @@ -238,7 +238,7 @@ int avfilter_config_links(AVFilterContext *filter) · 237 unmodified lines | ||
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL; |
| 241 | − link->current_pts = AV_NOPTS_VALUE; | |
| 241 | + link->current_pts_us = AV_NOPTS_VALUE; | |
| 242 | 242 | |
| 243 | 243 | switch (link->init_state) { |
| 244 | 244 | case AVLINK_INIT: |
| @@ -443,7 +443,7 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts) · 198 unmodified lines | ||
| 443 | 443 | { |
| 444 | 444 | if (pts == AV_NOPTS_VALUE) |
| 445 | 445 | return; |
| 446 | − link->current_pts = av_rescale_q(pts, link->time_base, AV_TIME_BASE_Q); | |
| 446 | + link->current_pts_us = av_rescale_q(pts, link->time_base, AV_TIME_BASE_Q); | |
| 447 | 447 | /* TODO use duration */ |
| 448 | 448 | if (link->graph && link->age_index >= 0) |
| 449 | 449 | ff_avfilter_graph_update_heap(link->graph, link); |
| @@ -437,7 +437,7 @@ struct AVFilterLink { · 436 unmodified lines | ||
| 437 | 437 | * Current timestamp of the link, as defined by the most recent |
| 438 | 438 | * frame(s), in AV_TIME_BASE units. |
| 439 | 439 | */ |
| 440 | − int64_t current_pts; | |
| 440 | + int64_t current_pts_us; | |
| 441 | 441 | |
| 442 | 442 | /** |
| 443 | 443 | * Index in the age array. |
| @@ -1324,7 +1324,7 @@ static void heap_bubble_up(AVFilterGraph *graph, · 1323 unmodified lines | ||
| 1324 | 1324 | |
| 1325 | 1325 | while (index) { |
| 1326 | 1326 | int parent = (index - 1) >> 1; |
| 1327 | − if (links[parent]->current_pts >= link->current_pts) | |
| 1327 | + if (links[parent]->current_pts_us >= link->current_pts_us) | |
| 1328 | 1328 | break; |
| 1329 | 1329 | links[index] = links[parent]; |
| 1330 | 1330 | links[index]->age_index = index; |
| @@ -1346,9 +1346,9 @@ static void heap_bubble_down(AVFilterGraph *graph, · 15 unmodified lines | ||
| 1346 | 1346 | if (child >= graph->sink_links_count) |
| 1347 | 1347 | break; |
| 1348 | 1348 | if (child + 1 < graph->sink_links_count && |
| 1349 | − links[child + 1]->current_pts < links[child]->current_pts) | |
| 1349 | + links[child + 1]->current_pts_us < links[child]->current_pts_us) | |
| 1350 | 1350 | child++; |
| 1351 | − if (link->current_pts < links[child]->current_pts) | |
| 1351 | + if (link->current_pts_us < links[child]->current_pts_us) | |
| 1352 | 1352 | break; |
| 1353 | 1353 | links[index] = links[child]; |
| 1354 | 1354 | links[index]->age_index = index; |