From patchwork Sat Oct 22 19:02:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 1122 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp1557326vsd; Sat, 22 Oct 2016 12:03:09 -0700 (PDT) X-Received: by 10.28.64.213 with SMTP id n204mr7734442wma.64.1477162989860; Sat, 22 Oct 2016 12:03:09 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r187si4227047wmr.28.2016.10.22.12.03.09; Sat, 22 Oct 2016 12:03:09 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F1DC5689C9F; Sat, 22 Oct 2016 22:02:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-3.mx.upcmail.net (vie01a-dmta-pe04-3.mx.upcmail.net [62.179.121.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 836DD689BE6 for ; Sat, 22 Oct 2016 22:02:21 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1by1Ym-00011A-Ks for ffmpeg-devel@ffmpeg.org; Sat, 22 Oct 2016 21:02:24 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id yj2P1t00g0S5wYM01j2Q0Y; Sat, 22 Oct 2016 21:02:24 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 22 Oct 2016 21:02:09 +0200 Message-Id: <20161022190211.16526-11-michael@niedermayer.cc> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161022190211.16526-1-michael@niedermayer.cc> References: <20161022190211.16526-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 11/13] avcodec/mpegutils: Move emms_c() before conditional return paths in ff_draw_horiz_band() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavcodec/mpegutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }