[Bf-blender-cvs] [0c51010] master: Fix video FFmpeg nt being able to produce video files due to usage of deprecated settings

Sergey Sharybin noreply at git.blender.org
Mon Apr 14 20:15:44 CEST 2014


Commit: 0c51010c67f70fa901b74d941c041f06df50201a
Author: Sergey Sharybin
Date:   Tue Apr 15 00:15:09 2014 +0600
https://developer.blender.org/rB0c51010c67f70fa901b74d941c041f06df50201a

Fix video FFmpeg nt being able to produce video files due to usage of deprecated settings

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

M	intern/ffmpeg/ffmpeg_compat.h
M	source/blender/blenkernel/intern/writeffmpeg.c

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

diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
index 82240c7..ac4da5b 100644
--- a/intern/ffmpeg/ffmpeg_compat.h
+++ b/intern/ffmpeg/ffmpeg_compat.h
@@ -442,4 +442,8 @@ AVRational av_get_r_frame_rate_compat(const AVStream *stream)
 #  define AV_OPT_SEARCH_FAKE_OBJ 0
 #endif
 
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100)
+#  define FFMPEG_HAVE_DEPRECATED_FLAGS2
+#endif
+
 #endif
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index fcfd4f9..dbceba2 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1438,20 +1438,26 @@ static void ffmpeg_set_expert_options(RenderData *rd)
 		BKE_ffmpeg_property_add_string(rd, "video", "bf:3");
 		BKE_ffmpeg_property_add_string(rd, "video", "refs:2");
 		BKE_ffmpeg_property_add_string(rd, "video", "qcomp:0.6");
-		BKE_ffmpeg_property_add_string(rd, "video", "directpred:3");  // Deprecated.
 
 		BKE_ffmpeg_property_add_string(rd, "video", "trellis:0");
-		BKE_ffmpeg_property_add_string(rd, "video", "flags2:wpred");  // Deprecated.
 		BKE_ffmpeg_property_add_string(rd, "video", "weightb:1");
-		BKE_ffmpeg_property_add_string(rd, "video", "flags2:dct8x8");  // Deprecated.
+#ifdef FFMPEG_HAVE_DEPRECATED_FLAGS2
+		BKE_ffmpeg_property_add_string(rd, "video", "flags2:dct8x8");
+		BKE_ffmpeg_property_add_string(rd, "video", "directpred:3");
+		BKE_ffmpeg_property_add_string(rd, "video", "flags2:fastpskip");
+		BKE_ffmpeg_property_add_string(rd, "video", "flags2:wpred");
+#else
 		BKE_ffmpeg_property_add_string(rd, "video", "8x8dct:1");
-		BKE_ffmpeg_property_add_string(rd, "video", "flags2:fastpskip");  // Deprecated.
 		BKE_ffmpeg_property_add_string(rd, "video", "fast-pskip:1");
 		BKE_ffmpeg_property_add_string(rd, "video", "wpredp:2");
+#endif
 
 		if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT) {
-			BKE_ffmpeg_property_add_string(rd, "video", "cqp:0");  // Deprecated.
+#ifdef FFMPEG_HAVE_DEPRECATED_FLAGS2
+			BKE_ffmpeg_property_add_string(rd, "video", "cqp:0");
+#else
 			BKE_ffmpeg_property_add_string(rd, "video", "qp:0");
+#endif
 		}
 	}
 	else if (codec_id == AV_CODEC_ID_DNXHD) {




More information about the Bf-blender-cvs mailing list