diff options
author | S.N. Hemanth Meenakshisundaram <smeenaks@ucsd.edu> | 2010-07-22 11:12:47 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-07-22 11:12:47 +0000 |
commit | bdab614be8df5681b7fbb89abfd08312f2686279 (patch) | |
tree | 0bb0e0fcbf6944d69ab2567197fbd52aa2bb281f /libavfilter/avfilter.c | |
parent | 98137a1a5b1a4438ab4d84e63a957dc83c7dacaf (diff) | |
download | ffmpeg-bdab614be8df5681b7fbb89abfd08312f2686279.tar.gz |
Generalize pixel format enum fields to int formats.
This is needed to make the libavfilter framework work with audio
filters.
In particular add a type field to AVFilterLink, change the field types:
enum PixelFormat format -> int format in AVFilterBuffer
enum PixelFormat *formats -> int *formats in AVFilterFormats
enum PixelFormat *format -> int format in AVFilterLink
and change the function signatures:
AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts); ->
AVFilterFormats *avfilter_make_format_list(const int *fmts);
int avfilter_add_colorspace(AVFilterFormats **avff, enum PixelFormat pix_fmt); ->
int avfilter_add_format(AVFilterFormats **avff, int fmt);
AVFilterFormats *avfilter_all_colorspaces(void); ->
AVFilterFormats *avfilter_all_formats(enum AVMediaType type);
This change breaks libavfilter API/ABI.
Patch by S.N. Hemanth Meenakshisundaram |smeenaks|ucsd|edu|.
Originally committed as revision 24424 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index dc8f90d322..c040a9cefa 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -98,7 +98,9 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, link->dst = dst; link->srcpad = srcpad; link->dstpad = dstpad; - link->format = PIX_FMT_NONE; + link->type = src->output_pads[srcpad].type; + assert(PIX_FMT_NONE == -1 && SAMPLE_FMT_NONE == -1); + link->format = -1; return 0; } @@ -122,7 +124,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, link->dstpad = in; filt->inputs[in] = link; - /* if any information on supported colorspaces already exists on the + /* if any information on supported media formats already exists on the * link, we need to preserve that */ if(link->out_formats) avfilter_formats_changeref(&link->out_formats, |