History

lavfi: rename link.current_pts to current_pts_us.

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.

Nicolas George committed 11 years ago

Commit d03eab31 parent 63f7bee3 files · +6 −6Browse files

Unified · Split

3 files
  1. libavfilter/avfilter.c +2 −2
  2. libavfilter/avfilter.h +1 −1
  3. libavfilter/avfiltergraph.c +3 −3
libavfilter/avfilter.c+2−2
@@ -238,7 +238,7 @@ int avfilter_config_links(AVFilterContext *filter) · 237 unmodified lines
238238 }
239239
240240 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;
242242
243243 switch (link->init_state) {
244244 case AVLINK_INIT:
@@ -443,7 +443,7 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts) · 198 unmodified lines
443443 {
444444 if (pts == AV_NOPTS_VALUE)
445445 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);
447447 /* TODO use duration */
448448 if (link->graph && link->age_index >= 0)
449449 ff_avfilter_graph_update_heap(link->graph, link);
libavfilter/avfilter.h+1−1
@@ -437,7 +437,7 @@ struct AVFilterLink { · 436 unmodified lines
437437 * Current timestamp of the link, as defined by the most recent
438438 * frame(s), in AV_TIME_BASE units.
439439 */
440− int64_t current_pts;
440+ int64_t current_pts_us;
441441
442442 /**
443443 * Index in the age array.
libavfilter/avfiltergraph.c+3−3
@@ -1324,7 +1324,7 @@ static void heap_bubble_up(AVFilterGraph *graph, · 1323 unmodified lines
13241324
13251325 while (index) {
13261326 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)
13281328 break;
13291329 links[index] = links[parent];
13301330 links[index]->age_index = index;
@@ -1346,9 +1346,9 @@ static void heap_bubble_down(AVFilterGraph *graph, · 15 unmodified lines
13461346 if (child >= graph->sink_links_count)
13471347 break;
13481348 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)
13501350 child++;
1351− if (link->current_pts < links[child]->current_pts)
1351+ if (link->current_pts_us < links[child]->current_pts_us)
13521352 break;
13531353 links[index] = links[child];
13541354 links[index]->age_index = index;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t