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.
Showing the changes to libavfilter/avfiltergraph.c (1 of 6 files). Show all
Unified · Split
| @@ -32,13 +32,13 @@ · 31 unmodified lines | ||
| 32 | 32 | #include "libavutil/opt.h" |
| 33 | 33 | #include "libavutil/pixdesc.h" |
| 34 | 34 | |
| 35 | −#define FF_INTERNAL_FIELDS 1 | |
| 36 | −#include "framequeue.h" | |
| 37 | 35 | |
| 38 | 36 | #include "avfilter.h" |
| 39 | 37 | #include "buffersink.h" |
| 40 | 38 | #include "formats.h" |
| 39 | +#include "framequeue.h" | |
| 41 | 40 | #include "internal.h" |
| 41 | +#include "link_internal.h" | |
| 42 | 42 | #include "thread.h" |
| 43 | 43 | |
| 44 | 44 | #define OFFSET(x) offsetof(AVFilterGraph, x) |
| @@ -1483,10 +1483,11 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph) · 1438 unmodified lines | ||
| 1483 | 1483 | av_assert1(oldest->age_index >= 0); |
| 1484 | 1484 | frame_count = oldest->frame_count_out; |
| 1485 | 1485 | while (frame_count == oldest->frame_count_out) { |
| 1486 | + FilterLinkInternal * const li = ff_link_internal(oldest); | |
| 1486 | 1487 | r = ff_filter_graph_run_once(graph); |
| 1487 | 1488 | 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) | |
| 1490 | 1491 | ff_request_frame(oldest); |
| 1491 | 1492 | else if (r < 0) |
| 1492 | 1493 | return r; |