[FFmpeg-devel] [PATCH v3] avformat/avisynth: fix segfault when also compiled with libvmaf
Stephen Hutchinson
qyot27 at gmail.com
Mon Jul 28 04:38:10 EEST 2025
On 7/27/25 8:34 PM, Kacper Michajlow wrote:
> On Mon, 28 Jul 2025 at 02:04, Daniel Bermond <danielbermond at gmail.com> wrote:
>>
>> When FFmpeg is compiled with support for both avisynth and libvmaf,
>> a segmentation fault occurs when using avisynth (.avs) input.
>>
>> This happens because both avisynthplus and vmaf have the exactly
>> same C++ symbol 'Cache::~Cache()'[1][2], which is a C++ destructor.
>> When using avisynth input, this destructor is also called in the
>> vmaf side, although no vmaf object was created, thus causing a
>> segmentation fault.
>>
>> Without changing this conflicting symbol in avisynthplus and/or
>> vmaf upstream code, a solution is to switch the 'RTLD_LOCAL'[3]
>
> I'm not opposed to a workaround to the issues as an interim solution,
> but has this issue been reported to upstream? Classes with such
> generic names should be put in a namespace in the respective projects.
> Additionally it would be good for those projects to be built with
> -fvisibility=hidden to reduce the amount of exposed symbols and only
> expose API entry points.
>
As a stopgap, yeah, this is probably the cleanest solution.
It does need to be resolved upstream, though at least on the
AviSynth+ side, I don't know how/if the reason this hadn't
already been done was because it would have broken existing
plugin compatibility. Still worth looking at, though.
More information about the ffmpeg-devel
mailing list