History

Implement avfilter_graph_alloc().

Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit e15aeea1 parent a6fdd576 files · +16 −3Browse files

Unified · Split

6 files
  1. doc/APIchanges +3 −0
  2. ffmpeg.c +1 −1
  3. ffplay.c +1 −1
  4. libavfilter/avfilter.h +1 −1
  5. libavfilter/avfiltergraph.c +5 −0
  6. libavfilter/avfiltergraph.h +5 −0
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2009-03-08 · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2010-11-04 - r25672 - lavfi 1.55.0 - avfilter_graph_alloc()
17+ Add avfilter_graph_alloc() to libavfilter/avfiltergraph.h.
18+
1619 2010-11-02 - r25654 - lavcore 0.12.0 - av_get_bits_per_sample_fmt()
1720 Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and
1821 deprecate av_get_bits_per_sample_format().
ffmpeg.c+1−1
@@ -345,7 +345,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost) · 344 unmodified lines
345345 char args[255];
346346 int ret;
347347
348− graph = av_mallocz(sizeof(AVFilterGraph));
348+ graph = avfilter_graph_alloc();
349349
350350 if ((ret = avfilter_open(&ist->input_video_filter, avfilter_get_by_name("buffer"), "src")) < 0)
351351 return ret;
ffplay.c+1−1
@@ -1795,7 +1795,7 @@ static int video_thread(void *arg) · 1794 unmodified lines
17951795 char sws_flags_str[128];
17961796 FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P };
17971797 AVFilterContext *filt_src = NULL, *filt_out = NULL;
1798− AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph));
1798+ AVFilterGraph *graph = avfilter_graph_alloc();
17991799 snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);
18001800 graph->scale_sws_opts = av_strdup(sws_flags_str);
18011801
libavfilter/avfilter.h+1−1
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525 #include "libavutil/avutil.h"
2626
2727 #define LIBAVFILTER_VERSION_MAJOR 1
28−#define LIBAVFILTER_VERSION_MINOR 54
28+#define LIBAVFILTER_VERSION_MINOR 55
2929 #define LIBAVFILTER_VERSION_MICRO 0
3030
3131 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
libavfilter/avfiltergraph.c+5−0
@@ -26,6 +26,11 @@ · 25 unmodified lines
2626 #include "avfilter.h"
2727 #include "avfiltergraph.h"
2828
29+AVFilterGraph *avfilter_graph_alloc(void)
30+{
31+ return av_mallocz(sizeof(AVFilterGraph));
32+}
33+
2934 void avfilter_graph_destroy(AVFilterGraph *graph)
3035 {
3136 for(; graph->filter_count > 0; graph->filter_count --)
libavfilter/avfiltergraph.h+5−0
@@ -31,6 +31,11 @@ typedef struct AVFilterGraph { · 30 unmodified lines
3131 char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
3232 } AVFilterGraph;
3333
34+/**
35+ * Allocate a filter graph.
36+ */
37+AVFilterGraph *avfilter_graph_alloc(void);
38+
3439 /**
3540 * Get a filter instance with name name from graph.
3641 *

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