Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Stephen Hutchinson <qyot27@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/2 v2] avformat/avisynth: remove atexit() handler
Date: Sun, 28 Jul 2024 11:59:25 -0400
Message-ID: <5699c317-f771-42dd-9fa3-578be706e308@gmail.com> (raw)
In-Reply-To: <CALweWgAFMWmQWVQVVHRDAraWVU9CG7RMpvp4Zk+rtodSj+SsCg@mail.gmail.com>

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".

  reply	other threads:[~2024-07-28 15:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 16:56 Stephen Hutchinson
2024-07-19 16:56 ` [FFmpeg-devel] [PATCH 2/2 v2] avformat/avisynth: remove mutex lock from avisynth_read_close Stephen Hutchinson
2024-08-13 19:19   ` Stephen Hutchinson
2024-07-28  5:37 ` [FFmpeg-devel] [PATCH 1/2 v2] avformat/avisynth: remove atexit() handler Stephen Hutchinson
2024-07-28 13:38 ` Ramiro Polla
2024-07-28 15:59   ` Stephen Hutchinson [this message]
2024-08-11 20:08     ` Stephen Hutchinson
2024-07-29  4:43   ` [FFmpeg-devel] [PATCH 3/4] avformat/avisynth: remove library allocation from global state Stephen Hutchinson
2024-08-13 19:19     ` Stephen Hutchinson
2024-07-29  4:43   ` [FFmpeg-devel] [PATCH 4/4] avformat/avisynth: move avs_planes* consts into relevant function Stephen Hutchinson
2024-08-13 19:20     ` Stephen Hutchinson
2024-08-13 19:19 ` [FFmpeg-devel] [PATCH 1/2 v2] avformat/avisynth: remove atexit() handler Stephen Hutchinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5699c317-f771-42dd-9fa3-578be706e308@gmail.com \
    --to=qyot27@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git