From patchwork Sun Oct 2 07:46:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Burt P X-Patchwork-Id: 822 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp1039225vsd; Sun, 2 Oct 2016 00:46:52 -0700 (PDT) X-Received: by 10.194.234.69 with SMTP id uc5mr12317236wjc.76.1475394412503; Sun, 02 Oct 2016 00:46:52 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x20si29230580wju.228.2016.10.02.00.46.51; Sun, 02 Oct 2016 00:46:52 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 05579689EA1; Sun, 2 Oct 2016 10:46:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f67.google.com (mail-it0-f67.google.com [209.85.214.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9479D689E37 for ; Sun, 2 Oct 2016 10:46:29 +0300 (EEST) Received: by mail-it0-f67.google.com with SMTP id 184so4548004ity.0 for ; Sun, 02 Oct 2016 00:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=tTEbrGUqFVATdUxURx1Ovp5htDTp3uhAQRMd9yabwMg=; b=R2q6Eu3N2abxzXdPzJqGjMaPEgAQi/5hk4oIpS55bkjfDQrapblt8Vx8McvgADflgU V1VaUjlB+Hulvqo08IzmwQJALV7hHjFOOYljUzIAYc4jDCtJepP6mbBGVWreMaAAOrRN gzBd96cpqpdLDHwvomUdhG3+Sl83xE0k6QSHVvKzEh1/yayDF+82aCB1qdMJWlq43ja5 mHDG1RfCsfUKdYq0P0Bo3pSmL8kR72apWJHSnEI4wG677zeylWaNm9Pw5NkrurCy9Rly uI4AtIM4HX7btUyf8G/r1F8rIgA8V0S8bTSzbO9Iof9mjgtE2qdQvQkAqOC9PRJYMjsu SzBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=tTEbrGUqFVATdUxURx1Ovp5htDTp3uhAQRMd9yabwMg=; b=ECtCC4TRDwfpNnscMhc6xn/1FSRvr2QjLfHAPfZ2IhVNCe/KaiPTLp/yvlEdxZGIgy WDX3xRhSf2/8z6V6Q8+fzEYeN1vOwPzQ78iwFRNrC+cpUE24QMFQXcg/gnCIJEa09IlB dU5AjiTTpKULB46+uabJfKcpUcYmAx+QM4UMaBzkKUIshruwOF5Bz6J6/4cHnYSsOZ31 u5+ZqJPtFkLB+VhvSBNwVQXXzt1mvurDJ77gKNBsUrx3yZ6wGdNxAEg+IpuqUREJ+ucz NRc7nz7ugkDBAKb2USSpCcLqfA/6TAlml9FexfnO0/ZUPTsv/5rQtRPazVl0eAur959N piYw== X-Gm-Message-State: AA6/9Rka+Df++2Vqx0jgK8I+oTQctPZSOIQnsg0gtsLP4qzVph/5+d/yLoK9BNznjf0fDw== X-Received: by 10.36.92.20 with SMTP id q20mr11924964itb.10.1475394402107; Sun, 02 Oct 2016 00:46:42 -0700 (PDT) Received: from localhost.localdomain ([216.16.66.181]) by smtp.gmail.com with ESMTPSA id s185sm5387725ita.21.2016.10.02.00.46.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Oct 2016 00:46:41 -0700 (PDT) From: Burt P To: ffmpeg-devel@ffmpeg.org Date: Sun, 2 Oct 2016 02:46:29 -0500 Message-Id: <1475394393-10173-2-git-send-email-pburt0@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475394393-10173-1-git-send-email-pburt0@gmail.com> References: <1475394393-10173-1-git-send-email-pburt0@gmail.com> Subject: [FFmpeg-devel] [PATCH 1/5] af_hdcd: allow all HDCD sample rates X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- libavfilter/af_hdcd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c index 40dba3c..a9f2f93 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]; @@ -1730,11 +1735,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)