From patchwork Sat Apr 18 22:37:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 19076 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 D9FB944BAB4 for ; Sun, 19 Apr 2020 01:58:03 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B97B068B86B; Sun, 19 Apr 2020 01:58:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-3.mx.upcmail.net (vie01a-dmta-pe06-3.mx.upcmail.net [84.116.36.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8B0F068B7A7 for ; Sun, 19 Apr 2020 01:57:57 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1jPw6q-00014r-2m for ffmpeg-devel@ffmpeg.org; Sun, 19 Apr 2020 00:38:48 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Pw5rjFrZ06Jy6Pw5rjUvIw; Sun, 19 Apr 2020 00:37:47 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=GKl27dFK c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=TeiCpzSft4vvAhOGoNgA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 19 Apr 2020 00:37:44 +0200 Message-Id: <20200418223747.1211-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfE1+ePbq4AX9kdJ+HKhCPmjWNy7lpE2fb2vpAa1a+1sGMDLiYu/hy3watmP3ojeUdSe9An485Mim4r2XPA7xeBtmPK/tlIYg4gHF19yUTQyhoIQOutW2 CwQnJ8/9csRnBDQyPKdmiDWJV8LC2xq4mjxNPTRugcesWmHJuFer2y1a Subject: [FFmpeg-devel] [PATCH 1/4] avfilter/vf_spp: Remove unused AVCodecContext 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" Signed-off-by: Michael Niedermayer --- libavfilter/vf_spp.c | 7 +------ libavfilter/vf_spp.h | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index 7381938f7f..1b934aa9d7 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -460,9 +460,8 @@ static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts) SPPContext *s = ctx->priv; int ret; - s->avctx = avcodec_alloc_context3(NULL); s->dct = avcodec_dct_alloc(); - if (!s->avctx || !s->dct) + if (!s->dct) return AVERROR(ENOMEM); if (opts) { @@ -489,10 +488,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->temp); av_freep(&s->src); - if (s->avctx) { - avcodec_close(s->avctx); - av_freep(&s->avctx); - } av_freep(&s->dct); av_freep(&s->non_b_qp_table); } diff --git a/libavfilter/vf_spp.h b/libavfilter/vf_spp.h index c03073a4e1..879ed40f03 100644 --- a/libavfilter/vf_spp.h +++ b/libavfilter/vf_spp.h @@ -22,7 +22,6 @@ #ifndef AVFILTER_SPP_H #define AVFILTER_SPP_H -#include "libavcodec/avcodec.h" #include "libavcodec/avdct.h" #include "avfilter.h" @@ -38,7 +37,6 @@ typedef struct SPPContext { int temp_linesize; uint8_t *src; uint16_t *temp; - AVCodecContext *avctx; AVDCT *dct; int8_t *non_b_qp_table; int non_b_qp_alloc_size;