[Bf-blender-cvs] [1d4037645fb] blender-v3.1-release: Cleanup: quiet warnings for FFMPEG before 5.0

Campbell Barton noreply at git.blender.org
Tue Feb 22 15:12:55 CET 2022


Commit: 1d4037645fb5467f71258883b12dc734532cde44
Author: Campbell Barton
Date:   Tue Feb 22 22:38:29 2022 +1100
Branches: blender-v3.1-release
https://developer.blender.org/rB1d4037645fb5467f71258883b12dc734532cde44

Cleanup: quiet warnings for FFMPEG before 5.0

Even though 5.0 has been released newer distributions wont include it,
so quiet warnings.

===================================================================

M	source/blender/blenkernel/intern/writeffmpeg.c

===================================================================

diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 45bd977c109..36b3dedeeb0 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -974,9 +974,14 @@ static int start_ffmpeg_impl(FFMpegContext *context,
       break;
   }
 
-  /* Returns after this must 'goto fail;' */
+    /* Returns after this must 'goto fail;' */
 
+#  if LIBAVFORMAT_VERSION_MAJOR >= 59
   of->oformat = fmt;
+#  else
+  /* *DEPRECATED* 2022/08/01 For FFMPEG (<5.0) remove this else branch and the `ifdef` above. */
+  of->oformat = (AVOutputFormat *)fmt;
+#  endif
 
   if (video_codec == AV_CODEC_ID_DVVIDEO) {
     if (rectx != 720) {



More information about the Bf-blender-cvs mailing list