[FFmpeg-devel,10/13] avcodec/h264dec: Move emms_c() call before conditional return paths in ff_h264_draw_horiz_band()

Submitted by Michael Niedermayer on Oct. 22, 2016, 7:02 p.m.

Details

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

Commit Message

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

Patch hide | download patch | download mbox

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index ed0b724..2e17124 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -116,6 +116,8 @@  void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl,
 
     height = FFMIN(height, avctx->height - y);
 
+    emms_c();
+
     if (field_pic && h->first_field && !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD))
         return;
 
@@ -129,8 +131,6 @@  void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl,
         for (i = 3; i < AV_NUM_DATA_POINTERS; i++)
             offset[i] = 0;
 
-        emms_c();
-
         avctx->draw_horiz_band(avctx, src, offset,
                                y, h->picture_structure, height);
     }