Commit 7e46bb80 authored by Burt P's avatar Burt P

af_hdcd: allow all HDCD sample rates

The PM Model Two could output HDCD-encoded audio in CD and all
DVD-Audio sample rates. (44100, 48000, 88200, 96000, 176400, and
192000 Hz)
Signed-off-by: 's avatarBurt P <pburt0@gmail.com>
parent de9b23ac
...@@ -1693,9 +1693,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) ...@@ -1693,9 +1693,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int query_formats(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx)
{ {
static const int sample_rates[] = {
44100, 48000,
88200, 96000,
176400, 192000,
-1
};
AVFilterFormats *in_formats; AVFilterFormats *in_formats;
AVFilterFormats *out_formats; AVFilterFormats *out_formats;
AVFilterFormats *sample_rates = NULL;
AVFilterChannelLayouts *layouts = NULL; AVFilterChannelLayouts *layouts = NULL;
AVFilterLink *inlink = ctx->inputs[0]; AVFilterLink *inlink = ctx->inputs[0];
AVFilterLink *outlink = ctx->outputs[0]; AVFilterLink *outlink = ctx->outputs[0];
...@@ -1733,11 +1738,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -1733,11 +1738,8 @@ static int query_formats(AVFilterContext *ctx)
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = ff_add_format(&sample_rates, 44100); return
if (ret < 0) ff_set_common_samplerates(ctx, ff_make_format_list(sample_rates) );
return AVERROR(ENOMEM);
return ff_set_common_samplerates(ctx, sample_rates);
} }
static av_cold void uninit(AVFilterContext *ctx) static av_cold void uninit(AVFilterContext *ctx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment