From patchwork Fri Jan 13 11:40:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 2204 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp140410vsb; Fri, 13 Jan 2017 03:40:40 -0800 (PST) X-Received: by 10.28.147.134 with SMTP id v128mr2029138wmd.3.1484307640448; Fri, 13 Jan 2017 03:40:40 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h61si10904793wrh.254.2017.01.13.03.40.40; Fri, 13 Jan 2017 03:40:40 -0800 (PST) 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 503EA689F9B; Fri, 13 Jan 2017 13:40:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from golem.pkh.me (LStLambert-657-1-117-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C24FB687EE6 for ; Fri, 13 Jan 2017 13:40:05 +0200 (EET) Received: from localhost (golem.pkh.me [local]) by golem.pkh.me (OpenSMTPD) with ESMTPA id cb143916; Fri, 13 Jan 2017 11:40:08 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 Jan 2017 12:40:06 +0100 Message-Id: <20170113114007.15690-2-u@pkh.me> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170113114007.15690-1-u@pkh.me> References: <20170113114007.15690-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] lavc/h264_slice: drop redundant current_slice reset 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 Cc: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Clément Bœsch It is done unconditionally in ff_h264_field_end() --- libavcodec/h264_slice.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 9a334a97cb..2dc98c109c 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1797,13 +1797,11 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl, if (h->cur_pic_ptr && FIELD_PICTURE(h) && h->first_field) { ret = ff_h264_field_end(h, h->slice_ctx, 1); - h->current_slice = 0; if (ret < 0) return ret; } else if (h->cur_pic_ptr && !FIELD_PICTURE(h) && !h->first_field && h->nal_unit_type == H264_NAL_IDR_SLICE) { av_log(h, AV_LOG_WARNING, "Broken frame packetizing\n"); ret = ff_h264_field_end(h, h->slice_ctx, 1); - h->current_slice = 0; ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX, 0); ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX, 1); h->cur_pic_ptr = NULL;