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

Michael Niedermayer michael at niedermayer.cc
Sat Oct 22 22:02:08 EEST 2016


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/h264dec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
     }
-- 
2.10.1



More information about the ffmpeg-devel mailing list