The planar/packed switch and the packing_formats list is no longer required, since the planar/packed information is now stored in the sample format enum. This is technically a major API break, possibly it should be not too painful as we marked the audio filtering API as unstable.
Showing the changes to libavfilter/avfiltergraph.c (1 of 28 files). Show all
Unified · Split
| @@ -200,14 +200,12 @@ static int insert_conv_filter(AVFilterGraph *graph, AVFilterLink *link, · 199 unmodified lines | ||
| 200 | 200 | |
| 201 | 201 | if (link->type == AVMEDIA_TYPE_AUDIO && |
| 202 | 202 | (((link = filt_ctx-> inputs[0]) && |
| 203 | − (!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) || | |
| 204 | − !avfilter_merge_formats(link->in_packing, link->out_packing))) || | |
| 203 | + !ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts)) || | |
| 205 | 204 | ((link = filt_ctx->outputs[0]) && |
| 206 | − (!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) || | |
| 207 | − !avfilter_merge_formats(link->in_packing, link->out_packing)))) | |
| 205 | + !ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts))) | |
| 208 | 206 | ) { |
| 209 | 207 | av_log(NULL, AV_LOG_ERROR, |
| 210 | − "Impossible to convert between the channel layouts/packing formats supported by the filter " | |
| 208 | + "Impossible to convert between the channel layouts formats supported by the filter " | |
| 211 | 209 | "'%s' and the filter '%s'\n", link->src->name, link->dst->name); |
| 212 | 210 | return AVERROR(EINVAL); |
| 213 | 211 | } |
| @@ -219,7 +217,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 5 unmodified lines | ||
| 219 | 217 | { |
| 220 | 218 | int i, j, ret; |
| 221 | 219 | char filt_args[128]; |
| 222 | − AVFilterFormats *formats, *packing; | |
| 220 | + AVFilterFormats *formats; | |
| 223 | 221 | AVFilterChannelLayouts *chlayouts; |
| 224 | 222 | AVFilterFormats *samplerates; |
| 225 | 223 | int scaler_count = 0, resampler_count = 0; |
| @@ -254,8 +252,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 28 unmodified lines | ||
| 254 | 252 | return ret; |
| 255 | 253 | } |
| 256 | 254 | else if (link->type == AVMEDIA_TYPE_AUDIO) { |
| 257 | − if (!link->in_channel_layouts || !link->out_channel_layouts || | |
| 258 | − !link->in_packing || !link->out_packing) | |
| 255 | + if (!link->in_channel_layouts || !link->out_channel_layouts) | |
| 259 | 256 | return AVERROR(EINVAL); |
| 260 | 257 | |
| 261 | 258 | /* Merge all three list before checking: that way, in all |
| @@ -264,9 +261,8 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 2 unmodified lines | ||
| 264 | 261 | formats = avfilter_merge_formats(link->in_formats, link->out_formats); |
| 265 | 262 | chlayouts = ff_merge_channel_layouts(link->in_channel_layouts , link->out_channel_layouts); |
| 266 | 263 | samplerates = ff_merge_samplerates (link->in_samplerates, link->out_samplerates); |
| 267 | − packing = avfilter_merge_formats(link->in_packing, link->out_packing); | |
| 268 | 264 | |
| 269 | − if (!formats || !chlayouts || !packing || !samplerates) | |
| 265 | + if (!formats || !chlayouts || !samplerates) | |
| 270 | 266 | if (ret = insert_conv_filter(graph, link, "aconvert", NULL)) |
| 271 | 267 | return ret; |
| 272 | 268 | #else |