diff mbox

[FFmpeg-devel,11/13] avcodec/mpegutils: Move emms_c() before conditional return paths in ff_draw_horiz_band()

Message ID 20161022190211.16526-11-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Oct. 22, 2016, 7:02 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/mpegutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c
index 62cc36a..1e6620e 100644
--- a/libavcodec/mpegutils.c
+++ b/libavcodec/mpegutils.c
@@ -42,6 +42,8 @@  void ff_draw_horiz_band(AVCodecContext *avctx,
 
     h = FFMIN(h, avctx->height - y);
 
+    emms_c();
+
     if (field_pic && first_field &&
         !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD))
         return;
@@ -72,8 +74,6 @@  void ff_draw_horiz_band(AVCodecContext *avctx,
                 offset[i] = 0;
         }
 
-        emms_c();
-
         avctx->draw_horiz_band(avctx, src, offset,
                                y, picture_structure, h);
     }