Commit 8bf025e2 authored by benoit's avatar benoit

Initialize thread_context[0] with h264 parser context.

This allows freeing the parser memory in the thread_context freeing loop.

Patch by Rafaël Carré gmailify(rafael, carre)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21508 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 51cbb596
......@@ -309,11 +309,17 @@ static void close(AVCodecParserContext *s)
ff_h264_free_context(h);
}
static int init(AVCodecParserContext *s)
{
H264Context *h = s->priv_data;
h->thread_context[0] = h;
return 0;
}
AVCodecParser h264_parser = {
{ CODEC_ID_H264 },
sizeof(H264Context),
NULL,
init,
h264_parse,
close,
h264_split,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment