summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-02 10:43:08 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-02 10:43:08 +0000
commita6f2c0d6e5ccedf2f25c1ea9d83fc646e644ef52 (patch)
tree9acc7c507e467af9c805b7a034f9ad2f4db140fb /libavcodec/mpegvideo.c
parent1599c47ce32a993f3db3b352e313385325449e21 (diff)
Fix regression test failure with pthreads on multiprocessor systems.
Fixes issue517 Originally committed as revision 15976 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 4bc32a2316..ddc4d091aa 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -289,6 +289,7 @@ static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base){
//FIXME should be linesize instead of s->width*2 but that is not known before get_buffer()
CHECKED_ALLOCZ(s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t))
+ s->me.temp= s->me.scratchpad;
s->rd_scratchpad= s->me.scratchpad;
s->b_scratchpad= s->me.scratchpad;
s->obmc_scratchpad= s->me.scratchpad + 16;
@@ -315,6 +316,7 @@ static void free_duplicate_context(MpegEncContext *s){
av_freep(&s->allocated_edge_emu_buffer); s->edge_emu_buffer= NULL;
av_freep(&s->me.scratchpad);
+ s->me.temp=
s->rd_scratchpad=
s->b_scratchpad=
s->obmc_scratchpad= NULL;
@@ -331,6 +333,7 @@ static void backup_duplicate_context(MpegEncContext *bak, MpegEncContext *src){
COPY(allocated_edge_emu_buffer);
COPY(edge_emu_buffer);
COPY(me.scratchpad);
+ COPY(me.temp);
COPY(rd_scratchpad);
COPY(b_scratchpad);
COPY(obmc_scratchpad);