From patchwork Thu Dec 8 23:09:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 1727 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp499vsa; Thu, 8 Dec 2016 15:09:33 -0800 (PST) X-Received: by 10.28.184.88 with SMTP id i85mr3988817wmf.49.1481238572882; Thu, 08 Dec 2016 15:09:32 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o134si15230660wmd.69.2016.12.08.15.09.25; Thu, 08 Dec 2016 15:09:32 -0800 (PST) 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=@googlemail.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=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 61C1B689F76; Fri, 9 Dec 2016 01:09:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wj0-f196.google.com (mail-wj0-f196.google.com [209.85.210.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29358689EC0 for ; Fri, 9 Dec 2016 01:09:13 +0200 (EET) Received: by mail-wj0-f196.google.com with SMTP id he10so123931wjc.2 for ; Thu, 08 Dec 2016 15:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=m3y/iNBdLkXx/7RxNI9euhPJObrAwesvc/5o12hsydw=; b=UeAixDrwhfa09yLu8W+N21CTmDt6BjB+K1rNy+sjyvgecLDVvGEvQ4IHRYlYNL0kGV /qphbHfuR+66wfVjXv+zE9TeOPZVsj46yVSvqg+4AAf896ECj7q2DbIN/ce3CBag2Wis 65hKBYHnU5+y6XVYsW5oHytPZuj0lb9z2MUJsxX1wm0kARVtT/+9JtsLJeRQEttUWZna TuFgl43voBhjuwEo7zWEBBqQJCc0or/gdAaFfri84fF9aTr/ISut0wKpLuPVlMBe/FsC J5gvBBvXB7Mh9Na9iDQ8TbNMH2T88bmNBLWw+3ZD1xRebyseVqbnAmR3x4OKxIOELLUX wDQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=m3y/iNBdLkXx/7RxNI9euhPJObrAwesvc/5o12hsydw=; b=dK+kUXuoq63CquONqn2zSW8iJrvzs1Bz3e8+rVorpr5+YvQY9S6eSc4bW/H21OHOzq yCE1IKCcFDFDfr7f+dwfMMeLWtx3YDniInOJlgfX0bZqb/oaf8oQDzzdzJXph2T6MdxZ n1w159zqdjs2HPNADWfp1EcbirmzSp1+zIMK/5NtgFLFBJkFIdMYZb+QX2fKqwNG61vZ fsms7VtDGZEMagihabYMyVAdkqyaIfzc+pTeHaVDKFf16ivOHATp2jKij5wn292rGDjK 9IUuVxEZ/C1ZxYgVUD8Azd0aZUTKbuR0hk4mzTSnuflV/o/I4mfrGoPwJQAjiIqxo1lU xXMQ== X-Gm-Message-State: AKaTC03J3nDt/+QbMIEG1ip+txqEI2mvdoO0zlLK+KMhPyKQc73g1i/VVpFJZVnc8OzenQ== X-Received: by 10.194.105.228 with SMTP id gp4mr46829454wjb.208.1481238555976; Thu, 08 Dec 2016 15:09:15 -0800 (PST) Received: from [192.168.2.21] (p5B0959BE.dip0.t-ipconnect.de. [91.9.89.190]) by smtp.googlemail.com with ESMTPSA id ab10sm39255636wjc.45.2016.12.08.15.09.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 15:09:15 -0800 (PST) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: FFmpeg development discussions and patches References: Message-ID: <88cef9b9-cd19-6056-2163-0c91e13ef5b9@googlemail.com> Date: Fri, 9 Dec 2016 00:09:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Subject: [FFmpeg-devel] [PATCH 2/2] opus_parser: replace ff_parse_close with opus_parse_close 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The former expects priv_data to be the ParseContext directly, so using it does not work. Signed-off-by: Andreas Cadhalpun --- libavcodec/opus_parser.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavcodec/opus_parser.c b/libavcodec/opus_parser.c index 21a73ee..95f5725 100644 --- a/libavcodec/opus_parser.c +++ b/libavcodec/opus_parser.c @@ -180,9 +180,16 @@ static int opus_parse(AVCodecParserContext *ctx, AVCodecContext *avctx, return next; } +static void opus_parse_close(AVCodecParserContext *ctx) +{ + OpusParseContext *s = ctx->priv_data; + ParseContext *pc = &s->pc; + av_freep(&pc->buffer); +} + AVCodecParser ff_opus_parser = { .codec_ids = { AV_CODEC_ID_OPUS }, .priv_data_size = sizeof(OpusParseContext), .parser_parse = opus_parse, - .parser_close = ff_parse_close + .parser_close = opus_parse_close };