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:
Michael Niedermayer 2012-05-17 16:51:59 +02:00
commit dc2e051c4f
2 changed files with 7 additions and 1 deletions

View File

@ -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,

View File

@ -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);