From patchwork Mon Dec 2 13:18:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 16531 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D0982446C0A for ; Mon, 2 Dec 2019 15:19:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BC7A368B02B; Mon, 2 Dec 2019 15:19:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C896568B02B for ; Mon, 2 Dec 2019 15:19:12 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1575292738; bh=P0wDcKDAnnq5BG/DpzbY3mp+nwBFfxHyDHKA+7YwOhE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=bZwNiMvhEUOi3BBfUoPm0ejKb8Shv8obNtGW2ue5xBWLEREWywLSzGm6/6nC5aqDC bwuNtr8IqI4iKjyd9CEP5ZerhLAnjUCRxF9Bz8RJXqM03INRv479C1FKVS14jV1HL0 SCoToZCwlLY/jho9b9GzwY0MpYDxLZxTCmP2/hKk= X-QQ-mid: esmtp7t1575292736ta8mlzva3 Received: from ZHILIZHAO-MB1.tencent.com (unknown [14.17.22.53]) by esmtp4.qq.com (ESMTP) with id ; Mon, 02 Dec 2019 21:18:54 +0800 (CST) X-QQ-SSF: 01000000000000N0VG3006000000002 X-QQ-FEAT: lvd1m1FGblQ7yFFLMRBcms5+bl9DRDgc9pRwiH/xxRPZfowbrFehiUEvr/uAw F3l3TmntEJBGvPf5EAuRXIDYaQRTR755fehQli5ml9u1vyikWv4tv+eNxMMhtEOfQdGOfyR v1qWkXA0qUHoH28/y4/faUEunXKdh3BI1kkZJpECKQrWLn5VDq/nraVOLkRJZgfT84u8QBs QSxaUvXobGCArAfudQ6iuyIMpnc3VMO2Aj+FH+m0qUst/6LwgDRs+SK43ANGbZ5lI+BQABD jtMFe1ClrKYBs2MLrCaxuFbYx+VkIiCWXOLg== X-QQ-GoodBg: 0 From: quinkblack@foxmail.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 2 Dec 2019 21:18:51 +0800 Message-Id: <20191202131851.3563-2-quinkblack@foxmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20191202131851.3563-1-quinkblack@foxmail.com> References: <20191202131851.3563-1-quinkblack@foxmail.com> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: esmtp:foxmail.com:bgforeign:bgforeign11 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH 2/2] avfilter/buffersrc: deprecate sws_param option 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 Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Zhao Zhili --- doc/filters.texi | 4 +--- libavfilter/buffersrc.c | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 5fdec6f015..9b3c2d7c2d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -21014,9 +21014,7 @@ Specify the frame rate expected for the video stream. The sample (pixel) aspect ratio of the input video. @item sws_param -Specify the optional parameters to be used for the scale filter which -is automatically inserted when an input change is detected in the -input size or format. +This option is deprecated and ignored. @item hw_frames_ctx When using a hardware pixel format, this should be a reference to an diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index bae7d86695..af6039f9b3 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -287,10 +287,14 @@ static av_cold int init_video(AVFilterContext *ctx) if (!(c->fifo = av_fifo_alloc(sizeof(AVFrame*)))) return AVERROR(ENOMEM); - av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d pixfmt:%s tb:%d/%d fr:%d/%d sar:%d/%d sws_param:%s\n", + av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d pixfmt:%s tb:%d/%d fr:%d/%d sar:%d/%d\n", c->w, c->h, av_get_pix_fmt_name(c->pix_fmt), c->time_base.num, c->time_base.den, c->frame_rate.num, c->frame_rate.den, - c->pixel_aspect.num, c->pixel_aspect.den, (char *)av_x_if_null(c->sws_param, "")); + c->pixel_aspect.num, c->pixel_aspect.den); + + if (c->sws_param) + av_log(ctx, AV_LOG_WARNING, "sws_param option is deprecated and ignored\n"); + return 0; }