Showing the changes to libavfilter/avfiltergraph.c (1 of 4 files). Show all
Unified · Split
| @@ -56,6 +56,8 @@ static const AVOption filtergraph_options[] = { · 55 unmodified lines | ||
| 56 | 56 | AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|V }, |
| 57 | 57 | {"aresample_swr_opts" , "default aresample filter options" , OFFSET(aresample_swr_opts) , |
| 58 | 58 | 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 }, | |
| 59 | 61 | { NULL }, |
| 60 | 62 | }; |
| 61 | 63 | |
| @@ -1296,6 +1298,8 @@ int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) · 1234 unmodified lines | ||
| 1296 | 1298 | { |
| 1297 | 1299 | int ret; |
| 1298 | 1300 | |
| 1301 | + if (graphctx->max_buffered_frames) | |
| 1302 | + fffiltergraph(graphctx)->frame_queues.max_queued = graphctx->max_buffered_frames; | |
| 1299 | 1303 | if ((ret = graph_check_validity(graphctx, log_ctx))) |
| 1300 | 1304 | return ret; |
| 1301 | 1305 | if ((ret = graph_config_formats(graphctx, log_ctx))) |