OSDN Git Service

avcodec/mpegvideo_enc: Add missing emms_c() to clear MMX state after SIMD use
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 21 Oct 2016 13:01:36 +0000 (15:01 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 22 Oct 2016 11:46:46 +0000 (13:46 +0200)
Fixes undefined behavior due to calling libc allocation with unclean FPU state

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mpegvideo_enc.c

index f34003e..1540e5c 100644 (file)
@@ -1320,6 +1320,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
                                                 EDGE_BOTTOM);
                     }
                 }
+                emms_c();
             }
         }
         ret = av_frame_copy_props(pic->f, pic_arg);