mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
lavfi: drop planar/packed negotiation support
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.
This commit is contained in:
@@ -200,14 +200,12 @@ static int insert_conv_filter(AVFilterGraph *graph, AVFilterLink *link,
|
||||
|
||||
if (link->type == AVMEDIA_TYPE_AUDIO &&
|
||||
(((link = filt_ctx-> inputs[0]) &&
|
||||
(!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) ||
|
||||
!avfilter_merge_formats(link->in_packing, link->out_packing))) ||
|
||||
!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts)) ||
|
||||
((link = filt_ctx->outputs[0]) &&
|
||||
(!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) ||
|
||||
!avfilter_merge_formats(link->in_packing, link->out_packing))))
|
||||
!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts)))
|
||||
) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Impossible to convert between the channel layouts/packing formats supported by the filter "
|
||||
"Impossible to convert between the channel layouts formats supported by the filter "
|
||||
"'%s' and the filter '%s'\n", link->src->name, link->dst->name);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
@@ -219,7 +217,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
||||
{
|
||||
int i, j, ret;
|
||||
char filt_args[128];
|
||||
AVFilterFormats *formats, *packing;
|
||||
AVFilterFormats *formats;
|
||||
AVFilterChannelLayouts *chlayouts;
|
||||
AVFilterFormats *samplerates;
|
||||
int scaler_count = 0, resampler_count = 0;
|
||||
@@ -254,8 +252,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
||||
return ret;
|
||||
}
|
||||
else if (link->type == AVMEDIA_TYPE_AUDIO) {
|
||||
if (!link->in_channel_layouts || !link->out_channel_layouts ||
|
||||
!link->in_packing || !link->out_packing)
|
||||
if (!link->in_channel_layouts || !link->out_channel_layouts)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
/* Merge all three list before checking: that way, in all
|
||||
@@ -264,9 +261,8 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
||||
formats = avfilter_merge_formats(link->in_formats, link->out_formats);
|
||||
chlayouts = ff_merge_channel_layouts(link->in_channel_layouts , link->out_channel_layouts);
|
||||
samplerates = ff_merge_samplerates (link->in_samplerates, link->out_samplerates);
|
||||
packing = avfilter_merge_formats(link->in_packing, link->out_packing);
|
||||
|
||||
if (!formats || !chlayouts || !packing || !samplerates)
|
||||
if (!formats || !chlayouts || !samplerates)
|
||||
if (ret = insert_conv_filter(graph, link, "aconvert", NULL))
|
||||
return ret;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user