[FFmpeg-cvslog] avcodec/mpegvideo_enc: Clear mmx state in ff_mpv_reallocate_putbitbuffer()

Michael Niedermayer git at videolan.org
Sun Dec 4 22:12:56 EET 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Fri Oct 21 14:05:00 2016 +0200| [9128ef0302084ab5e7d87ed5fbe95846eda8d8d8] | committer: Michael Niedermayer

avcodec/mpegvideo_enc: Clear mmx state in ff_mpv_reallocate_putbitbuffer()

This function must be called from the mb or slice encoding loop and MMX state may not
be clean there

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 03ec6b780cfae85b8bf0f32b2eda201063ad061b)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9128ef0302084ab5e7d87ed5fbe95846eda8d8d8
---

 libavcodec/mpegvideo_enc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 297ff78..4af65a6 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2912,6 +2912,8 @@ int ff_mpv_reallocate_putbitbuffer(MpegEncContext *s, size_t threshold, size_t s
             return AVERROR(ENOMEM);
         }
 
+        emms_c();
+
         av_fast_padded_malloc(&new_buffer, &new_buffer_size,
                               s->avctx->internal->byte_buffer_size + size_increase);
         if (!new_buffer)



More information about the ffmpeg-cvslog mailing list