[FFmpeg-devel] [PATCH 2/2] avfilter/vf_scale2ref: switch to FFFrameSync

Niklas Haas ffmpeg at haasn.xyz
Fri Mar 15 12:18:54 EET 2024


> This should be &tmp. It is probably the reason for Michael's segfault.
> Apart from that: It is easier if you simply used 0..2 for *iter (1==
> returned sws_get_class, 2 returned ff_framesync_child_class_iterate).

Changed this function to:

static const AVClass *child_class_iterate(void **iter)
{
    void *tmp = NULL;
    switch ((uintptr_t)*iter) {
    case 0:
        *iter = (void*)(uintptr_t)1;
        return sws_get_class();
    case 1:
        *iter = (void*)(uintptr_t)2;
        return ff_framesync_child_class_iterate(&tmp);
    }

    return NULL;
}


More information about the ffmpeg-devel mailing list