0002-mod_av-fix-build-with-ffmpeg-6.0.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 2e75bb8b2c7f70c5d16c9e3d14b1427f4eb80c9c Mon Sep 17 00:00:00 2001
  2. From: Korynkai <matt@qmxtech.com>
  3. Date: Thu, 17 Aug 2023 21:10:31 +0200
  4. Subject: [PATCH] mod_av: fix build with ffmpeg 6.0
  5. Upstream: https://github.com/signalwire/freeswitch/issues/2202
  6. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  7. ---
  8. src/mod/applications/mod_av/avformat.c | 2 ++
  9. src/mod/applications/mod_av/mod_av.h | 1 +
  10. 2 files changed, 3 insertions(+)
  11. diff --git a/src/mod/applications/mod_av/avformat.c b/src/mod/applications/mod_av/avformat.c
  12. index 69475c169f..0a1662aed6 100644
  13. --- a/src/mod/applications/mod_av/avformat.c
  14. +++ b/src/mod/applications/mod_av/avformat.c
  15. @@ -455,6 +455,7 @@ static int mod_avformat_alloc_output_context2(AVFormatContext **avctx, const cha
  16. }
  17. s->oformat = oformat;
  18. +#if (LIBAVFORMAT_VERSION_MAJOR < LIBAVFORMAT_N)
  19. if (s->oformat->priv_data_size > 0) {
  20. s->priv_data = av_mallocz(s->oformat->priv_data_size);
  21. if (!s->priv_data) {
  22. @@ -468,6 +469,7 @@ static int mod_avformat_alloc_output_context2(AVFormatContext **avctx, const cha
  23. } else {
  24. s->priv_data = NULL;
  25. }
  26. +#endif
  27. if (filename) {
  28. #if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,7,100))
  29. diff --git a/src/mod/applications/mod_av/mod_av.h b/src/mod/applications/mod_av/mod_av.h
  30. index a89e6cb8f7..ef9bd48d73 100644
  31. --- a/src/mod/applications/mod_av/mod_av.h
  32. +++ b/src/mod/applications/mod_av/mod_av.h
  33. @@ -42,6 +42,7 @@
  34. #define LIBAVCODEC_V 59
  35. #define LIBAVFORMAT_V 59
  36. +#define LIBAVFORMAT_N 60
  37. #define LIBAVUTIL_V 57
  38. struct mod_av_globals {
  39. --
  40. 2.39.2