H264: Copy h264dsp when creating new slice threads

Fixes slice multithreading (broken in r22565)
Fixes issue1815

Originally committed as revision 22740 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Alexander Strange 2010-03-31 03:55:42 +00:00
parent 49553ec865
commit 7a5c850be9

View File

@ -1843,6 +1843,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
c = h->thread_context[i] = av_malloc(sizeof(H264Context));
memcpy(c, h->s.thread_context[i], sizeof(MpegEncContext));
memset(&c->s + 1, 0, sizeof(H264Context) - sizeof(MpegEncContext));
c->h264dsp = h->h264dsp;
c->sps = h->sps;
c->pps = h->pps;
init_scan_tables(c);