You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avfilter/avfilter: add AVFilterGraph->max_buffered_frames to limit buffered frames
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2025-07-xx - xxxxxxxxxd - lavfi 11.2.100 - avfilter.h
|
||||||
|
Add AVFilterGraph->max_buffered_frames.
|
||||||
|
|
||||||
2025-07-07 - eca477da52 - lavc 62.6.100 - packet.h
|
2025-07-07 - eca477da52 - lavc 62.6.100 - packet.h
|
||||||
Add AV_PKT_DATA_RTCP_SR.
|
Add AV_PKT_DATA_RTCP_SR.
|
||||||
|
|
||||||
|
@@ -629,6 +629,14 @@ typedef struct AVFilterGraph {
|
|||||||
avfilter_execute_func *execute;
|
avfilter_execute_func *execute;
|
||||||
|
|
||||||
char *aresample_swr_opts; ///< swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions
|
char *aresample_swr_opts; ///< swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the maximum number of buffered frames in the filtergraph combined.
|
||||||
|
*
|
||||||
|
* Zero means no limit. This field must be set before calling
|
||||||
|
* avfilter_graph_config().
|
||||||
|
*/
|
||||||
|
unsigned max_buffered_frames;
|
||||||
} AVFilterGraph;
|
} AVFilterGraph;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -56,6 +56,8 @@ static const AVOption filtergraph_options[] = {
|
|||||||
AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|V },
|
AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|V },
|
||||||
{"aresample_swr_opts" , "default aresample filter options" , OFFSET(aresample_swr_opts) ,
|
{"aresample_swr_opts" , "default aresample filter options" , OFFSET(aresample_swr_opts) ,
|
||||||
AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|A },
|
AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|A },
|
||||||
|
{"max_buffered_frames" , "maximum number of buffered frames allowed", OFFSET(max_buffered_frames),
|
||||||
|
AV_OPT_TYPE_UINT, {.i64 = 0}, 0, UINT_MAX, F|V|A },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1296,6 +1298,8 @@ int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (graphctx->max_buffered_frames)
|
||||||
|
fffiltergraph(graphctx)->frame_queues.max_queued = graphctx->max_buffered_frames;
|
||||||
if ((ret = graph_check_validity(graphctx, log_ctx)))
|
if ((ret = graph_check_validity(graphctx, log_ctx)))
|
||||||
return ret;
|
return ret;
|
||||||
if ((ret = graph_config_formats(graphctx, log_ctx)))
|
if ((ret = graph_config_formats(graphctx, log_ctx)))
|
||||||
|
@@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
#include "version_major.h"
|
#include "version_major.h"
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_MINOR 1
|
#define LIBAVFILTER_VERSION_MINOR 2
|
||||||
#define LIBAVFILTER_VERSION_MICRO 101
|
#define LIBAVFILTER_VERSION_MICRO 100
|
||||||
|
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||||
|
Reference in New Issue
Block a user