The former expects priv_data to be the ParseContext directly, so using it does not work.
Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> --- 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 }; -- 2.10.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel