From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id BA010410AA for ; Mon, 12 Sep 2022 02:02:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E284B68BB10; Mon, 12 Sep 2022 05:02:46 +0300 (EEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 685D768BAA9 for ; Mon, 12 Sep 2022 05:02:40 +0300 (EEST) Received: by mail-ej1-f50.google.com with SMTP id w16so1453383eji.9 for ; Sun, 11 Sep 2022 19:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=OQEc9yOpo68GGl92LfqWUIw3f4smWfCGzAfKE7hIuyc=; b=XhUVEovOysCo39dn9yUXZczdcU1KYiq4nkd/CbuliNu4bbQMuED+JgAmbBkfn+f1ye ZLwhS2u0FDZT52TRyELjSamevFDLw531YI7g4+QKUlKAv2zeRP512WlPoDnf5/qvzFxc ZKg3f6nuZUUINcHnob+H34JiljHWQS837qNVWFCoTdmzEVTJL2jo42Dom3PbGH5YcSW3 VTpdBROpz0LVFtzjfr+wG0hmtpNPvWOfHkJ2WdflcUn8WBC/wD80Mo0qiZ+ukQNcSal0 LxAtNuXX1l7W4csJwmPqbgo5wrbsGW6Fghr/lzUuTAGusQDsoIeS5bW62bU+3eHTR141 f16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=OQEc9yOpo68GGl92LfqWUIw3f4smWfCGzAfKE7hIuyc=; b=Q7zyRXEG9LQIHIF77d2beYmImnp0H/TsixqQKgJIevuGBYYM9w1UR3TmKW4CcXy/Jz oo71LiCAMnPPxWt/SpGMlZgR/mhdx8v55+LTpj0vMTkSfqNfv/IH5/msrNaqzmKnxMTE oryd5MPsw6L3Kmy6BkrrbM/8yB11U8nQF3dxQS7uJWKcheuHn+2MpaV6VnplSPxg/Voa AaE2zy3nfErlK7jcfsYIA7kAJhftEHQp0waLgYRlxpvkCRFPnuZOnCgMvttes/uzvJID 1gaD2xblk9Jm+9ko2Vc15qMHuJMyzmUhbc0B9PH3YysPtgEW4jb1m0cC2GPCKr6nOJav fABg== X-Gm-Message-State: ACgBeo1XekRCmz9amGo2aiWgfKCxTJNDCsaqe0ZKYBrFPkJP9RZZCnPC uWMiXmDzoZwGnonFKsc7ejskmbYTzmmv7E11kveOYXNkEXyd X-Google-Smtp-Source: AA6agR6mNNvmGmnB5DXdrpyAL0QNpOC7w8vksmJY20dMaNwHl6s0QW9TsJQ6EtY900r8Dqq6d2/Tvrbz0FCGt6Cr140= X-Received: by 2002:a17:906:9b92:b0:730:a237:40fe with SMTP id dd18-20020a1709069b9200b00730a23740femr17150593ejc.464.1662948159210; Sun, 11 Sep 2022 19:02:39 -0700 (PDT) MIME-Version: 1.0 References: <166222954842.3205.17186561679857350925@lain.khirnov.net> <20220903183930.9223-1-anton@khirnov.net> <20220903183930.9223-2-anton@khirnov.net> In-Reply-To: <20220903183930.9223-2-anton@khirnov.net> From: Wang Bin Date: Mon, 12 Sep 2022 10:02:27 +0800 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH 2/2] lavc/pthread_frame: avoid leaving stale hwaccel state in worker threads X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > > > av_packet_unref(p->avpkt); > @@ -655,6 +670,14 @@ void ff_thread_finish_setup(AVCodecContext *avctx) { > async_lock(p->parent); > } > > + /* save hwaccel state for passing to the next thread; > + * this is done here so that this worker thread can wipe its own > hwaccel > + * state after decoding, without requiring synchronization */ > + av_assert0(!p->parent->stash_hwaccel); > + p->parent->stash_hwaccel = avctx->hwaccel; > + p->parent->stash_hwaccel_context = avctx->hwaccel_context; > + p->parent->stash_hwaccel_priv = avctx->internal->hwaccel_priv_data; > Assertion failure when seeking. Step to reproduce: ./ffmpeg -stream_loop -1 -an -hwaccel vaapi -i test.mp4 -f null >/dev/null Regards _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".