diff options
author | Burt P <pburt0@gmail.com> | 2016-09-07 10:48:03 -0500 |
---|---|---|
committer | Burt P <pburt0@gmail.com> | 2016-10-05 12:37:55 -0500 |
commit | 7e46bb80efa4690515e40946f680ec43d67ffd8d (patch) | |
tree | 74ad2b5ef3f693de15adb9f371a495f711c18ae4 /libavfilter/af_hdcd.c | |
parent | de9b23ac1f9d5471458d11954fc12b9ea73502d3 (diff) | |
download | ffmpeg-7e46bb80efa4690515e40946f680ec43d67ffd8d.tar.gz |
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: Burt P <pburt0@gmail.com>
Diffstat (limited to 'libavfilter/af_hdcd.c')
-rw-r--r-- | libavfilter/af_hdcd.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c index c308da1f83..dd9ecc3796 100644 --- a/libavfilter/af_hdcd.c +++ b/libavfilter/af_hdcd.c @@ -1693,9 +1693,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) static int query_formats(AVFilterContext *ctx) { + static const int sample_rates[] = { + 44100, 48000, + 88200, 96000, + 176400, 192000, + -1 + }; AVFilterFormats *in_formats; AVFilterFormats *out_formats; - AVFilterFormats *sample_rates = NULL; AVFilterChannelLayouts *layouts = NULL; AVFilterLink *inlink = ctx->inputs[0]; AVFilterLink *outlink = ctx->outputs[0]; @@ -1733,11 +1738,8 @@ static int query_formats(AVFilterContext *ctx) if (ret < 0) return ret; - ret = ff_add_format(&sample_rates, 44100); - if (ret < 0) - return AVERROR(ENOMEM); - - return ff_set_common_samplerates(ctx, sample_rates); + return + ff_set_common_samplerates(ctx, ff_make_format_list(sample_rates) ); } static av_cold void uninit(AVFilterContext *ctx) |