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
Showing the changes to libavfilter/avfilter.c (1 of 6 files). Show all
Unified · Split
| @@ -98,7 +98,9 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 97 unmodified lines | ||
| 98 | 98 | link->dst = dst; |
| 99 | 99 | link->srcpad = srcpad; |
| 100 | 100 | link->dstpad = dstpad; |
| 101 | − link->format = PIX_FMT_NONE; | |
| 101 | + link->type = src->output_pads[srcpad].type; | |
| 102 | + assert(PIX_FMT_NONE == -1 && SAMPLE_FMT_NONE == -1); | |
| 103 | + link->format = -1; | |
| 102 | 104 | |
| 103 | 105 | return 0; |
| 104 | 106 | } |
| @@ -122,7 +124,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 17 unmodified lines | ||
| 122 | 124 | link->dstpad = in; |
| 123 | 125 | filt->inputs[in] = link; |
| 124 | 126 | |
| 125 | − /* if any information on supported colorspaces already exists on the | |
| 127 | + /* if any information on supported media formats already exists on the | |
| 126 | 128 | * link, we need to preserve that */ |
| 127 | 129 | if(link->out_formats) |
| 128 | 130 | avfilter_formats_changeref(&link->out_formats, |