History

lavfi: get rid of FF_INTERNAL_FIELDS

This hack is used to limit the visibility of some AVFilterLink fields to only certain files. Replace it with the same pattern that is used e.g. in lavf AVStream/FFStream and avoid exposing these internal fields in a public header completely.

Anton Khirnov committed 4 years ago

Commit 86417b71 parent 1e7d2006 files · +198 −136Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 6 files). Show all

Unified · Split

libavfilter/avfiltergraph.c+5−4
@@ -32,13 +32,13 @@ · 31 unmodified lines
3232 #include "libavutil/opt.h"
3333 #include "libavutil/pixdesc.h"
3434
35−#define FF_INTERNAL_FIELDS 1
36−#include "framequeue.h"
3735
3836 #include "avfilter.h"
3937 #include "buffersink.h"
4038 #include "formats.h"
39+#include "framequeue.h"
4140 #include "internal.h"
41+#include "link_internal.h"
4242 #include "thread.h"
4343
4444 #define OFFSET(x) offsetof(AVFilterGraph, x)
@@ -1483,10 +1483,11 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph) · 1438 unmodified lines
14831483 av_assert1(oldest->age_index >= 0);
14841484 frame_count = oldest->frame_count_out;
14851485 while (frame_count == oldest->frame_count_out) {
1486+ FilterLinkInternal * const li = ff_link_internal(oldest);
14861487 r = ff_filter_graph_run_once(graph);
14871488 if (r == AVERROR(EAGAIN) &&
1488− !oldest->frame_wanted_out && !oldest->frame_blocked_in &&
1489− !oldest->status_in)
1489+ !oldest->frame_wanted_out && !li->frame_blocked_in &&
1490+ !li->status_in)
14901491 ff_request_frame(oldest);
14911492 else if (r < 0)
14921493 return r;

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