From 3ee4f5e4fae8c468d316f3b3a0fbbb42c730e600 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 Oct 2008 23:08:52 +0000 Subject: [PATCH] ff_parse_close() is not the correct function for H264Context. Originally committed as revision 15537 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264_parser.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 73b156964c..bc3a2c021d 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -139,12 +139,20 @@ static int h264_split(AVCodecContext *avctx, return 0; } +static close(AVCodecParserContext *s) +{ + H264Context *h = s->priv_data; + ParseContext *pc = &h->s.parse_context; + + av_free(pc->buffer); +} + AVCodecParser h264_parser = { { CODEC_ID_H264 }, sizeof(H264Context), NULL, h264_parse, - ff_parse_close, + close, h264_split, };