diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-04 20:34:19 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-04 20:34:19 +0000 |
commit | e15aeea6565f0e6386db7738814fcdde46c2dec3 (patch) | |
tree | 91d372dcc385aa2107ba29c392e4723c59b46af9 | |
parent | a6fdd5748fa015eaaf085695fc59240b6d0b9a7d (diff) | |
download | ffmpeg-e15aeea6565f0e6386db7738814fcdde46c2dec3.tar.gz |
Implement avfilter_graph_alloc().
Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | doc/APIchanges | 3 | ||||
-rw-r--r-- | ffmpeg.c | 2 | ||||
-rw-r--r-- | ffplay.c | 2 | ||||
-rw-r--r-- | libavfilter/avfilter.h | 2 | ||||
-rw-r--r-- | libavfilter/avfiltergraph.c | 5 | ||||
-rw-r--r-- | libavfilter/avfiltergraph.h | 5 |
6 files changed, 16 insertions, 3 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 81bd819ba6..973b2dfe0d 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2009-03-08 API changes, most recent first: +2010-11-04 - r25672 - lavfi 1.55.0 - avfilter_graph_alloc() + Add avfilter_graph_alloc() to libavfilter/avfiltergraph.h. + 2010-11-02 - r25654 - lavcore 0.12.0 - av_get_bits_per_sample_fmt() Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and deprecate av_get_bits_per_sample_format(). @@ -345,7 +345,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost) char args[255]; int ret; - graph = av_mallocz(sizeof(AVFilterGraph)); + graph = avfilter_graph_alloc(); if ((ret = avfilter_open(&ist->input_video_filter, avfilter_get_by_name("buffer"), "src")) < 0) return ret; @@ -1795,7 +1795,7 @@ static int video_thread(void *arg) char sws_flags_str[128]; FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P }; AVFilterContext *filt_src = NULL, *filt_out = NULL; - AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph)); + AVFilterGraph *graph = avfilter_graph_alloc(); snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); graph->scale_sws_opts = av_strdup(sws_flags_str); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index e8146e0b3a..ee1e0ad037 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -25,7 +25,7 @@ #include "libavutil/avutil.h" #define LIBAVFILTER_VERSION_MAJOR 1 -#define LIBAVFILTER_VERSION_MINOR 54 +#define LIBAVFILTER_VERSION_MINOR 55 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index baffc5168b..6aa08157b5 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -26,6 +26,11 @@ #include "avfilter.h" #include "avfiltergraph.h" +AVFilterGraph *avfilter_graph_alloc(void) +{ + return av_mallocz(sizeof(AVFilterGraph)); +} + void avfilter_graph_destroy(AVFilterGraph *graph) { for(; graph->filter_count > 0; graph->filter_count --) diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h index efb9cc02bc..0b08f026d2 100644 --- a/libavfilter/avfiltergraph.h +++ b/libavfilter/avfiltergraph.h @@ -32,6 +32,11 @@ typedef struct AVFilterGraph { } AVFilterGraph; /** + * Allocate a filter graph. + */ +AVFilterGraph *avfilter_graph_alloc(void); + +/** * Get a filter instance with name name from graph. * * @return the pointer to the found filter instance or NULL if it |