From patchwork Thu Nov 14 04:29:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 16255 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 6C22E447B0D for ; Thu, 14 Nov 2019 06:30:39 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 41F2C68A297; Thu, 14 Nov 2019 06:30:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpproxy21.qq.com (smtpbg702.qq.com [203.205.195.102]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 44667689F4B for ; Thu, 14 Nov 2019 06:30:32 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1573705811; bh=ZkFPpInhhgccW/FVcO0GIaufXo/ZHgEvlRiD08MWChE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=iMPHUFTBrZG6gCH9cZ0r7zOkKXvR/lqA99RaDKbPfVGkoyUVwXgZQr9TLv+WsAT4Z zsrQcbzgRBICkpoiBQ0t/C075vRVEPYzCD21ljxn6ZQ/u3I/TuTdY4x6w7Rw5kQ9DA WL+lujHUt6Tpj9K8y1Z11auL18KZqY0MVkSPEkRI= X-QQ-mid: esmtp2t1573705810tc8qxa4rx Received: from ZHILIZHAO-MB1.tencent.com (unknown [14.17.22.53]) by esmtp4.qq.com (ESMTP) with id ; Thu, 14 Nov 2019 12:30:09 +0800 (CST) X-QQ-SSF: 01000000000000N0VF2006000000002 X-QQ-FEAT: /pDhbcMb/V9BNbJegzbMzuwhs9u5WQaUTH8sHQTooVUp5LsDzlWkU9ZM+kCjL 5+WdmUPkAEdOeneLNlXVdDv1Gxc+Zl7Wunq5v4FL60n1gLiDlei1ykPK6GRvTc5iFGgVofm eSLzO7OP75FGV3RcQRHKABAeDtSb4i9rN33OY3OC0HIq8G9RitQWFJcTk0PewXx6YEmulqh YYyDTaoE5N7s9k0MHRwEeECosDtIJh9aqmS4pN2H6nOAD0kmqx7n+98oHcMv1p5Odmrapuq TXN550SVLWsO1Lflp/0JkaGhhe/PYfo5RtBw== X-QQ-GoodBg: 0 From: quinkblack@foxmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Nov 2019 12:29:55 +0800 Message-Id: <20191114042955.96220-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: References: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: esmtp:foxmail.com:bgforeign:bgforeign2 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH v2] avcodec/vp8: fix multiple ff_thread_finish_setup() calls 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: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Zhao Zhili webp decoder doesn't set update_thread_context field $ ffmpeg -i rgb_q80.webp -f null - [webp @ 0x7ffbd5823200] Multiple ff_thread_finish_setup() calls --- libavcodec/vp8.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index eb51d1f3c9..b4deb3ed67 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2715,7 +2715,8 @@ int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, s->next_framep[VP56_FRAME_CURRENT] = curframe; - ff_thread_finish_setup(avctx); + if (avctx->codec->update_thread_context) + ff_thread_finish_setup(avctx); if (avctx->hwaccel) { ret = avctx->hwaccel->start_frame(avctx, avpkt->data, avpkt->size);