History

avfilter/avfilter: add AVFilterGraph->max_buffered_frames to limit buffered frames

Marton Balint committed 1 year ago

Commit b24155c1 parent 71468e84 files · +17 −2Browse files

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

Unified · Split

libavfilter/avfiltergraph.c+4−0
@@ -56,6 +56,8 @@ static const AVOption filtergraph_options[] = { · 55 unmodified lines
5656 AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|V },
5757 {"aresample_swr_opts" , "default aresample filter options" , OFFSET(aresample_swr_opts) ,
5858 AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|A },
59+ {"max_buffered_frames" , "maximum number of buffered frames allowed", OFFSET(max_buffered_frames),
60+ AV_OPT_TYPE_UINT, {.i64 = 0}, 0, UINT_MAX, F|V|A },
5961 { NULL },
6062 };
6163
@@ -1296,6 +1298,8 @@ int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) · 1234 unmodified lines
12961298 {
12971299 int ret;
12981300
1301+ if (graphctx->max_buffered_frames)
1302+ fffiltergraph(graphctx)->frame_queues.max_queued = graphctx->max_buffered_frames;
12991303 if ((ret = graph_check_validity(graphctx, log_ctx)))
13001304 return ret;
13011305 if ((ret = graph_config_formats(graphctx, log_ctx)))

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