--- libavutil/avassert.h.orig	2023-11-11 01:25:17.000000000 +0100
+++ libavutil/avassert.h	2024-05-31 20:57:25.815315915 +0200
@@ -34,13 +34,17 @@
 #include "log.h"
 #include "macros.h"
 
+extern void av_fatalHandler(const char *why,const char *file, int lineno);
+typedef void (AV_FATAL_HANDLER)(const char *why,int lineno, const char *file);
+
+extern void av_setFatalHandler(AV_FATAL_HANDLER *func);
+
 /**
  * assert() equivalent, that is always enabled.
  */
 #define av_assert0(cond) do {                                           \
     if (!(cond)) {                                                      \
-        av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n",    \
-               AV_STRINGIFY(cond), __FILE__, __LINE__);                 \
+        av_fatalHandler( AV_STRINGIFY(cond),__FILE__,__LINE__);         \
         abort();                                                        \
     }                                                                   \
 } while (0)
