Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -13,6 +13,9 @@ libavutil: 2009-03-08 · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | API changes, most recent first: | 14 | API changes, most recent first: |
| 15 | 15 | ||
| 16 | 2010-11-04 - r25672 - lavfi 1.55.0 - avfilter_graph_alloc() | ||
| 17 | Add avfilter_graph_alloc() to libavfilter/avfiltergraph.h. | ||
| 18 | |||
| 16 | 2010-11-02 - r25654 - lavcore 0.12.0 - av_get_bits_per_sample_fmt() | 19 | 2010-11-02 - r25654 - lavcore 0.12.0 - av_get_bits_per_sample_fmt() |
| 17 | Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and | 20 | Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and |
| 18 | deprecate av_get_bits_per_sample_format(). | 21 | deprecate av_get_bits_per_sample_format(). |
| @@ -345,7 +345,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost) · 344 unmodified lines | |||
| 345 | char args[255]; | 345 | char args[255]; |
| 346 | int ret; | 346 | int ret; |
| 347 | 347 | ||
| 348 | graph = av_mallocz(sizeof(AVFilterGraph)); | 348 | graph = avfilter_graph_alloc(); |
| 349 | 349 | ||
| 350 | if ((ret = avfilter_open(&ist->input_video_filter, avfilter_get_by_name("buffer"), "src")) < 0) | 350 | if ((ret = avfilter_open(&ist->input_video_filter, avfilter_get_by_name("buffer"), "src")) < 0) |
| 351 | return ret; | 351 | return ret; |
| @@ -1795,7 +1795,7 @@ static int video_thread(void *arg) · 1794 unmodified lines | |||
| 1795 | char sws_flags_str[128]; | 1795 | char sws_flags_str[128]; |
| 1796 | FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P }; | 1796 | FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P }; |
| 1797 | AVFilterContext *filt_src = NULL, *filt_out = NULL; | 1797 | AVFilterContext *filt_src = NULL, *filt_out = NULL; |
| 1798 | AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph)); | 1798 | AVFilterGraph *graph = avfilter_graph_alloc(); |
| 1799 | snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); | 1799 | snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); |
| 1800 | graph->scale_sws_opts = av_strdup(sws_flags_str); | 1800 | graph->scale_sws_opts = av_strdup(sws_flags_str); |
| 1801 | 1801 | ||
| @@ -25,7 +25,7 @@ · 24 unmodified lines | |||
| 25 | #include "libavutil/avutil.h" | 25 | #include "libavutil/avutil.h" |
| 26 | 26 | ||
| 27 | #define LIBAVFILTER_VERSION_MAJOR 1 | 27 | #define LIBAVFILTER_VERSION_MAJOR 1 |
| 28 | #define LIBAVFILTER_VERSION_MINOR 54 | 28 | #define LIBAVFILTER_VERSION_MINOR 55 |
| 29 | #define LIBAVFILTER_VERSION_MICRO 0 | 29 | #define LIBAVFILTER_VERSION_MICRO 0 |
| 30 | 30 | ||
| 31 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ | 31 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| @@ -26,6 +26,11 @@ · 25 unmodified lines | |||
| 26 | #include "avfilter.h" | 26 | #include "avfilter.h" |
| 27 | #include "avfiltergraph.h" | 27 | #include "avfiltergraph.h" |
| 28 | 28 | ||
| 29 | AVFilterGraph *avfilter_graph_alloc(void) | ||
| 30 | { | ||
| 31 | return av_mallocz(sizeof(AVFilterGraph)); | ||
| 32 | } | ||
| 33 | |||
| 29 | void avfilter_graph_destroy(AVFilterGraph *graph) | 34 | void avfilter_graph_destroy(AVFilterGraph *graph) |
| 30 | { | 35 | { |
| 31 | for(; graph->filter_count > 0; graph->filter_count --) | 36 | for(; graph->filter_count > 0; graph->filter_count --) |
| @@ -31,6 +31,11 @@ typedef struct AVFilterGraph { · 30 unmodified lines | |||
| 31 | char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters | 31 | char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters |
| 32 | } AVFilterGraph; | 32 | } AVFilterGraph; |
| 33 | 33 | ||
| 34 | /** | ||
| 35 | * Allocate a filter graph. | ||
| 36 | */ | ||
| 37 | AVFilterGraph *avfilter_graph_alloc(void); | ||
| 38 | |||
| 34 | /** | 39 | /** |
| 35 | * Get a filter instance with name name from graph. | 40 | * Get a filter instance with name name from graph. |
| 36 | * | 41 | * |