summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-08-25 16:12:28 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-10-01 22:07:11 +0200
commit87b7e141a6fda7f450aff4560b776d546af313ed (patch)
treeea38a27b65298823112b5d5fd46e460f8b23f7e4 /libavcodec/libx264.c
parent7ffa458d600eccbd2582d755af75c03bdaa9e51f (diff)
lavc/x264: Use FF_CODEC_CAP_INIT_THREADSAFE if x264 is new.
Usage of strtok() was removed from x264, see also b02490a4
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 8788286fae..bfd91bb900 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -1180,7 +1180,11 @@ AVCodec ff_libx264_encoder = {
.priv_class = &x264_class,
.defaults = x264_defaults,
.init_static_data = X264_init_static,
+#if X264_BUILD >= 158
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
+#else
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
+#endif
.wrapper_name = "libx264",
};
#endif
@@ -1207,7 +1211,11 @@ AVCodec ff_libx264rgb_encoder = {
.priv_class = &rgbclass,
.defaults = x264_defaults,
.pix_fmts = pix_fmts_8bit_rgb,
+#if X264_BUILD >= 158
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
+#else
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
+#endif
.wrapper_name = "libx264",
};
#endif