mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 18:32:22 +00:00
Merge branch 'audio-filters' of https://github.com/ubitux/FFmpeg
* 'audio-filters' of https://github.com/ubitux/FFmpeg: lavfi/pan: add supported sample rates to avoid a crash. ffmpeg: do not warn when expecting EOF from lavfi. Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
dc2e051c4f
2
ffmpeg.c
2
ffmpeg.c
@ -1964,7 +1964,7 @@ static int poll_filters(void)
|
||||
AV_BUFFERSINK_FLAG_NO_REQUEST);
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
if (ret != AVERROR(EAGAIN)) {
|
||||
if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) {
|
||||
char buf[256];
|
||||
av_strerror(ret, buf, sizeof(buf));
|
||||
av_log(NULL, AV_LOG_WARNING,
|
||||
|
@ -213,12 +213,18 @@ static int query_formats(AVFilterContext *ctx)
|
||||
PanContext *pan = ctx->priv;
|
||||
AVFilterLink *inlink = ctx->inputs[0];
|
||||
AVFilterLink *outlink = ctx->outputs[0];
|
||||
AVFilterFormats *formats = NULL;
|
||||
AVFilterChannelLayouts *layouts;
|
||||
|
||||
pan->pure_gains = are_gains_pure(pan);
|
||||
/* libswr supports any sample and packing formats */
|
||||
avfilter_set_common_sample_formats(ctx, avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO));
|
||||
|
||||
formats = ff_all_samplerates();
|
||||
if (!formats)
|
||||
return AVERROR(ENOMEM);
|
||||
ff_set_common_samplerates(ctx, formats);
|
||||
|
||||
// inlink supports any channel layout
|
||||
layouts = ff_all_channel_layouts();
|
||||
ff_channel_layouts_ref(layouts, &inlink->out_channel_layouts);
|
||||
|
Loading…
Reference in New Issue
Block a user