Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/ffmpeg/ffmpeg_compat.h4
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c16
2 files changed, 15 insertions, 5 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
index 82240c7cb4f..ac4da5b6133 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 fcfd4f9dd85..dbceba288c7 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) {