# HG changeset patch # User benoit # Date 1264683865 0 # Node ID 916df4ea4e64b0a8fb34ad093725cb26dc2afb30 # Parent 74f672a1f763b00036fc128b8b9c41e1c4b7d02e 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) diff -r 74f672a1f763 -r 916df4ea4e64 h264_parser.c --- a/h264_parser.c Thu Jan 28 11:37:35 2010 +0000 +++ b/h264_parser.c Thu Jan 28 13:04:25 2010 +0000 @@ -309,11 +309,17 @@ 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,