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) Originally committed as revision 21508 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
committed by
Benoit Fouet
parent
592e03a8da
commit
e9ca315dd1
@@ -309,11 +309,17 @@ static void close(AVCodecParserContext *s)
|
|||||||
ff_h264_free_context(h);
|
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 = {
|
AVCodecParser h264_parser = {
|
||||||
{ CODEC_ID_H264 },
|
{ CODEC_ID_H264 },
|
||||||
sizeof(H264Context),
|
sizeof(H264Context),
|
||||||
NULL,
|
init,
|
||||||
h264_parse,
|
h264_parse,
|
||||||
close,
|
close,
|
||||||
h264_split,
|
h264_split,
|
||||||
|
|||||||
Reference in New Issue
Block a user