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 91E554C503 for ; Sun, 28 Jul 2024 15:59:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 386B468D8D8; Sun, 28 Jul 2024 18:59:36 +0300 (EEST) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3205B68D73F for ; Sun, 28 Jul 2024 18:59:30 +0300 (EEST) Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3db19caec60so1979869b6e.1 for ; Sun, 28 Jul 2024 08:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722182367; x=1722787167; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=QppTlnz0++KERq04MEWkxDaKIHOVxVn9bLowr1HyWiM=; b=GLeGqYzwd2CA/Eg2+e1ykztMqsQ6PysLNMYy+3CzucCEvz1buqp/IXoN4FVEtMWyFb picD2OgEZcMFDCP5HwjT5yNJ5y45DAUEAkVhsOWWsXwbEAH9/twTEpcbGRVPcn2O1FWq xeyb6B1Jym117mSkFl0p25C+E5H1CCLwO7m5sKByylx0qD3r7zHmlOkuuUHzSJjQoIXL N5V/wmM1RBR0W6VuuBVeW5d9+6JPgFnBLQg3fqlwXrqXgO0DpS7lPx1hK/tEeFxfnWkP Jaw4FHxcbVlQKl8zzJ2nbID3Z5U0NJC2JaBsymLSjPecmoMLRdhwKyMoUX3Yeo8Z67pT sf8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722182367; x=1722787167; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QppTlnz0++KERq04MEWkxDaKIHOVxVn9bLowr1HyWiM=; b=gIHf13DtPyGY4wKR/NHVaoMk5X8Z9D6e1LrA56MbjNwDGryPM/UKaXLgd6ocddp93y TJTZwrN3hl9ZblF17T0rNBsqKWIn6jgEtJ3RswLEVH0OFcvvgwJYNexqdzJ9Vq2N7Squ Ixrq39MhwR7BD3MAAXDBj2SBlo83GFw02z6iO0R+WwUAvkDQjRoTl+YuuSSlXhHhgcqj ZUBrX1m3f4yEgnY+6n60GWSK7kIoURdcjup4DXCey+gEMP7XimYbmCGORbmrcE4XKYro QDGnmPZKKb5imAe/+5cRyVExnedM43LAQRZh0SLl/wKgD8YlhWjsHOWGQIJ5WHor5WGt Z0Uw== X-Gm-Message-State: AOJu0YwD+WNPNnBN8qsWipAUdNk8fQ1wqh/qWUZ5t4xXrxbGWef8ECNZ +xcXh5SSKifwsiezaK3erjdKbNNQKSnI9O3ovz+i1Mnt+Ihsbk5m2aRZQw== X-Google-Smtp-Source: AGHT+IHeENqpWnq7cdGC7VHDucev3Ah/GnoYfKydi2oD8r285d3WN0tFG0Oph3JucvPiDzxAPi0Okg== X-Received: by 2002:a05:6358:e924:b0:19e:fa9c:5ec9 with SMTP id e5c5f4694b2df-1adc0665bfdmr582641655d.9.1722182366802; Sun, 28 Jul 2024 08:59:26 -0700 (PDT) Received: from [192.168.1.20] (syn-173-170-140-230.res.spectrum.com. [173.170.140.230]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-493d9639440sm1331488137.15.2024.07.28.08.59.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Jul 2024 08:59:26 -0700 (PDT) Message-ID: <5699c317-f771-42dd-9fa3-578be706e308@gmail.com> Date: Sun, 28 Jul 2024 11:59:25 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20240719165627.5490-1-qyot27@gmail.com> Content-Language: en-US From: Stephen Hutchinson In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/2 v2] avformat/avisynth: remove atexit() handler 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 7/28/24 9:38 AM, Ramiro Polla wrote: >> @@ -1134,6 +1089,7 @@ static av_cold int avisynth_read_close(AVFormatContext *s) >> return AVERROR_UNKNOWN; >> >> avisynth_context_destroy(s->priv_data); >> + dlclose(avs_library.library); > > Maybe it's best to wrap this around an if (avs_library.library). > True. I had tried toying around with C11 _Thread_local since we now use C17 as the default std, and in that case there was what I presume was a double free happening that required adding a check for whether avs_library.library still existed. As that hadn't been happening prior to that test I didn't really think much of it, but yeah, it would make sense to check it anyway. I abandoned that general idea after 1) finding out that while GCC and Clang are fine, MSVC doesn't seem to yet (or if it does, only the most recent versions of MSVC 2022 do) 2) C23 renamed it to thread_local, and most importantly, 3) I probably hadn't quite used it entirely correctly, because while the script could be parsed and played back just fine, trying to encode anything from it would segfault. _______________________________________________ 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".