From patchwork Fri Dec 9 22:46:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 1737 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp572674vsa; Fri, 9 Dec 2016 15:03:44 -0800 (PST) X-Received: by 10.28.191.130 with SMTP id o2mr436183wmi.97.1481324623978; Fri, 09 Dec 2016 15:03:43 -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 13si19786219wmb.71.2016.12.09.15.03.43; Fri, 09 Dec 2016 15:03:43 -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 F2760689E33; Sat, 10 Dec 2016 01:03:36 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wj0-f193.google.com (mail-wj0-f193.google.com [209.85.210.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6796D689E16 for ; Sat, 10 Dec 2016 01:03:30 +0200 (EET) Received: by mail-wj0-f193.google.com with SMTP id j10so4144281wjb.3 for ; Fri, 09 Dec 2016 15:03:34 -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; bh=Patup4dzJp3lMwXEYmOdbcAY0jJ9GUu484YQZ/whqAc=; b=t1EzoXh3C5cp4HCMndPwAHjN1k8jvdLVxw9pvNday60jLFNEYdhHorcaYOy+CgEMPX KQjkB0ohfLdc+owo/nz9qEIIHSc9yTKeoGQ7D38ZWFi6jEpz5g0fF2HDRAR9wiyHY2SJ 5VhzQ9YEDMxx/tonicgxXGFn0SUJdq2GpMX7/e6a0FUgSdAYbeVvOiF+LGVrL5K4bzHd FJSaYjfeZEPx+nhnun6+2u0lepjlOtBpkFhcRagMm7gT3yuxQd62Ez7xun+pwEzG3dtR L4/RO87wrGNfvWkhv52JAJrnTgj0r9OzCs6zsGinhfW9UVYIkgSouHIgmaqAtGvFjT+D VSxQ== 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; bh=Patup4dzJp3lMwXEYmOdbcAY0jJ9GUu484YQZ/whqAc=; b=Hffvmyz5cBuc+FEVtVpO4WJpnCj7L59PvOC4XFrE8Tg/KlCotP+KDRQTqb12An4dW1 7Qmv7gVHGVCgThMPIrCNb/s1UW5pmo93ZxAiRVckTZLsXr9ZeefdgtCqrBqiEv/x1KFx n6mRewAkGNz42ZioMDP8Ntm1PmPvdPf4BQDlfKKAvY3j03yUWwPBAfrBjLL6EOP69U46 94Bq01wXwSSnfgjwIHoBQFx95BZ9MghkAZLg+kgn4mVP3t4YTW+fkExM8v7PKpc06dT8 C/eEr+sO7p9IIFvQVc4lHpFuZZnsNo1j5eWLg4gyuNt7fFxPdFn33dfQedN+7mhDNVdG ioSw== X-Gm-Message-State: AKaTC01ZkqskK941CWLDYmfjExHkCwOmRVxJTTMBd+uP2A0OubDZP8S+PhJpnriWyzLaeQ== X-Received: by 10.194.114.10 with SMTP id jc10mr40148635wjb.157.1481323606146; Fri, 09 Dec 2016 14:46:46 -0800 (PST) Received: from [192.168.2.21] (p5B0958CE.dip0.t-ipconnect.de. [91.9.88.206]) by smtp.googlemail.com with ESMTPSA id kp5sm44591950wjb.8.2016.12.09.14.46.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2016 14:46:45 -0800 (PST) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: ffmpeg-devel@ffmpeg.org References: <88cef9b9-cd19-6056-2163-0c91e13ef5b9@googlemail.com> Message-ID: Date: Fri, 9 Dec 2016 23:46:44 +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: Re: [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" On 09.12.2016 15:02, Hendrik Leppkes wrote: > On Fri, Dec 9, 2016 at 12:09 AM, Andreas Cadhalpun > wrote: >> The former expects priv_data to be the ParseContext directly, so using >> it does not work. >> > > As an alternative re-order the OpusParseContext so that ParseContext > comes first, it then would work, and thats basically how its done in > the other parsers from what I can tell. Good idea, that makes the patch a bit shorter. Best regards, Andreas From 88596cbc50f43f7d29e1f9a3a4a115b3e8e60aaa Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Fri, 9 Dec 2016 00:01:35 +0100 Subject: [PATCH 2/2] opus_parser: make ParseContext the first element in OpusParseContext ff_parse_close expects priv_data to be the ParseContext directly and thus doesn't work if it isn't at the beginning of OpusParseContext. Signed-off-by: Andreas Cadhalpun --- libavcodec/opus_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/opus_parser.c b/libavcodec/opus_parser.c index c30fd7b..893573e 100644 --- a/libavcodec/opus_parser.c +++ b/libavcodec/opus_parser.c @@ -31,10 +31,10 @@ #include "parser.h" typedef struct OpusParseContext { + ParseContext pc; OpusContext ctx; OpusPacket pkt; int extradata_parsed; - ParseContext pc; int ts_framing; } OpusParseContext; -- 2.10.2