Unexpected FLV instead of H264 on 1.10.11/Debian12

We have been running 1.10.10/Debian11 with no problems, but when we tried 1.10.11/Debian12 the video codec was unexpectedly FLV instead of H.264.

We’re going to partially revert to 1.10.11/Debian11 but we’d like to know if there’s a solution for Debian12.

What are the steps to replicate this? More information is needed please.

This is what we see in the logs on Debian11:
avformat.c:3340 use video codec implementation Video: h264 (libx264), yuv420p(pc, gbr/unknown/unknown), 320x240, q=-1–1, 81 kb/s

This is on Debian12:
avformat.c:3340 use video codec implementation Video: flv1 (flv), yuv420p(pc, gbr/unknown/unknown), 320x240, q=2-31, 81 kb/s

The cause seems to be a change in the way the preprocessor directives are being processed when we compile avformat.c on Debian12. In previous versions,

#if (LIBAVFORMAT_VERSION_MAJOR < LIBAVFORMAT_V)

has been true, but since the upgrade to libavformat59 on Debian12, that’s not the case anymore.

To replicate it, you could add this

#if (LIBAVFORMAT_VERSION_MAJOR < LIBAVFORMAT_V)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, “Expected output.\n”);
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, “Unexpected output.\n”);
#endif

at line 3493, and compile on both versions of Debian.