Mercurial > libavcodec.hg
comparison h264.c @ 11562:66f3d2ff88b7 libavcodec
H264: Copy h264dsp when creating new slice threads
Fixes slice multithreading (broken in r22565)
Fixes issue1815
author | astrange |
---|---|
date | Wed, 31 Mar 2010 03:55:42 +0000 |
parents | 8a4984c5cacc |
children | 56591b8041ea |
comparison
equal
deleted
inserted
replaced
11561:dcf8221ed29f | 11562:66f3d2ff88b7 |
---|---|
1841 for(i = 1; i < s->avctx->thread_count; i++) { | 1841 for(i = 1; i < s->avctx->thread_count; i++) { |
1842 H264Context *c; | 1842 H264Context *c; |
1843 c = h->thread_context[i] = av_malloc(sizeof(H264Context)); | 1843 c = h->thread_context[i] = av_malloc(sizeof(H264Context)); |
1844 memcpy(c, h->s.thread_context[i], sizeof(MpegEncContext)); | 1844 memcpy(c, h->s.thread_context[i], sizeof(MpegEncContext)); |
1845 memset(&c->s + 1, 0, sizeof(H264Context) - sizeof(MpegEncContext)); | 1845 memset(&c->s + 1, 0, sizeof(H264Context) - sizeof(MpegEncContext)); |
1846 c->h264dsp = h->h264dsp; | |
1846 c->sps = h->sps; | 1847 c->sps = h->sps; |
1847 c->pps = h->pps; | 1848 c->pps = h->pps; |
1848 init_scan_tables(c); | 1849 init_scan_tables(c); |
1849 clone_tables(c, h, i); | 1850 clone_tables(c, h, i); |
1850 } | 1851 } |