comparison h264_parser.c @ 11043:916df4ea4e64 libavcodec

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)
author benoit
date Thu, 28 Jan 2010 13:04:25 +0000
parents cb73e3273191
children ec682347e19e
comparison
equal deleted inserted replaced
11042:74f672a1f763 11043:916df4ea4e64
307 307
308 av_free(pc->buffer); 308 av_free(pc->buffer);
309 ff_h264_free_context(h); 309 ff_h264_free_context(h);
310 } 310 }
311 311
312 static int init(AVCodecParserContext *s)
313 {
314 H264Context *h = s->priv_data;
315 h->thread_context[0] = h;
316 return 0;
317 }
312 318
313 AVCodecParser h264_parser = { 319 AVCodecParser h264_parser = {
314 { CODEC_ID_H264 }, 320 { CODEC_ID_H264 },
315 sizeof(H264Context), 321 sizeof(H264Context),
316 NULL, 322 init,
317 h264_parse, 323 h264_parse,
318 close, 324 close,
319 h264_split, 325 h264_split,
320 }; 326 };