NotYetAV1/nyav1.c

14 lines
453 B
C
Raw Normal View History

2024-04-18 17:08:01 +08:00
#include <stdio.h>
#include <dlfcn.h>
static int (*old) (void *a, void *b) = NULL;
int dav1d_open (void *a, void *b) {
int max_frame_delay = *(((int*)b)+1);
if (max_frame_delay == 1) {
if (!old) old = dlsym(RTLD_NEXT, "dav1d_open");
printf("dav1d_open passthrough, max_frame_delay=%d\n", max_frame_delay);
return old(a, b);
}
printf("dav1d_open force -1, max_frame_delay=%d\n", max_frame_delay);
return -1;
}