Message ID | b947bb0f-f686-fe99-1430-c48cd0a2127a@googlemail.com |
---|---|
State | Accepted, archived |
Headers | show |
On Fri, Dec 9, 2016 at 11:46 PM, Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> wrote: > On 09.12.2016 15:02, Hendrik Leppkes wrote: >> On Fri, Dec 9, 2016 at 12:09 AM, Andreas Cadhalpun >> <andreas.cadhalpun@googlemail.com> 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. > LGTM. - Hendrik
On 10.12.2016 01:17, Hendrik Leppkes wrote: > On Fri, Dec 9, 2016 at 11:46 PM, Andreas Cadhalpun > <andreas.cadhalpun@googlemail.com> wrote: >> On 09.12.2016 15:02, Hendrik Leppkes wrote: >>> On Fri, Dec 9, 2016 at 12:09 AM, Andreas Cadhalpun >>> <andreas.cadhalpun@googlemail.com> 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. >> > > LGTM. Pushed. Best regards, Andreas
From 88596cbc50f43f7d29e1f9a3a4a115b3e8e60aaa Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> 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 <Andreas.Cadhalpun@googlemail.com> --- 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