Specifically those that should be visible to filters, but hidden from API callers. Such properties are currently located at the end of the public AVFilterLink struct, demarcated by a comment marking them as private. However it is generally better to hide them explicitly, using the same pattern already employed in avformat or avcodec. The new struct is currently trivial, but will become more useful in following commits.
Showing the changes to libavfilter/avfiltergraph.c (1 of 4 files). Show all
Unified · Split
| @@ -1326,7 +1326,7 @@ static void heap_bubble_up(FFFilterGraph *graph, · 1325 unmodified lines | |||
| 1326 | 1326 | ||
| 1327 | while (index) { | 1327 | while (index) { |
| 1328 | int parent = (index - 1) >> 1; | 1328 | int parent = (index - 1) >> 1; |
| 1329 | if (links[parent]->l.current_pts_us >= li->l.current_pts_us) | 1329 | if (links[parent]->l.pub.current_pts_us >= li->l.pub.current_pts_us) |
| 1330 | break; | 1330 | break; |
| 1331 | links[index] = links[parent]; | 1331 | links[index] = links[parent]; |
| 1332 | links[index]->age_index = index; | 1332 | links[index]->age_index = index; |
| @@ -1348,9 +1348,9 @@ static void heap_bubble_down(FFFilterGraph *graph, · 15 unmodified lines | |||
| 1348 | if (child >= graph->sink_links_count) | 1348 | if (child >= graph->sink_links_count) |
| 1349 | break; | 1349 | break; |
| 1350 | if (child + 1 < graph->sink_links_count && | 1350 | if (child + 1 < graph->sink_links_count && |
| 1351 | links[child + 1]->l.current_pts_us < links[child]->l.current_pts_us) | 1351 | links[child + 1]->l.pub.current_pts_us < links[child]->l.pub.current_pts_us) |
| 1352 | child++; | 1352 | child++; |
| 1353 | if (li->l.current_pts_us < links[child]->l.current_pts_us) | 1353 | if (li->l.pub.current_pts_us < links[child]->l.pub.current_pts_us) |
| 1354 | break; | 1354 | break; |
| 1355 | links[index] = links[child]; | 1355 | links[index] = links[child]; |
| 1356 | links[index]->age_index = index; | 1356 | links[index]->age_index = index; |
| @@ -1372,13 +1372,13 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph) · 15 unmodified lines | |||
| 1372 | { | 1372 | { |
| 1373 | FFFilterGraph *graphi = fffiltergraph(graph); | 1373 | FFFilterGraph *graphi = fffiltergraph(graph); |
| 1374 | FilterLinkInternal *oldesti = graphi->sink_links[0]; | 1374 | FilterLinkInternal *oldesti = graphi->sink_links[0]; |
| 1375 | AVFilterLink *oldest = &oldesti->l; | 1375 | AVFilterLink *oldest = &oldesti->l.pub; |
| 1376 | int64_t frame_count; | 1376 | int64_t frame_count; |
| 1377 | int r; | 1377 | int r; |
| 1378 | 1378 | ||
| 1379 | while (graphi->sink_links_count) { | 1379 | while (graphi->sink_links_count) { |
| 1380 | oldesti = graphi->sink_links[0]; | 1380 | oldesti = graphi->sink_links[0]; |
| 1381 | oldest = &oldesti->l; | 1381 | oldest = &oldesti->l.pub; |
| 1382 | if (oldest->dst->filter->activate) { | 1382 | if (oldest->dst->filter->activate) { |
| 1383 | r = av_buffersink_get_frame_flags(oldest->dst, NULL, | 1383 | r = av_buffersink_get_frame_flags(oldest->dst, NULL, |
| 1384 | AV_BUFFERSINK_FLAG_PEEK); | 1384 | AV_BUFFERSINK_FLAG_PEEK); |