goto free_and_end;
}
+#if FF_API_THREAD_SAFE_CALLBACKS
+FF_DISABLE_DEPRECATION_WARNINGS
+ if ((avctx->thread_type & FF_THREAD_FRAME) &&
+ avctx->get_buffer2 != avcodec_default_get_buffer2 &&
+ !avctx->thread_safe_callbacks) {
+ av_log(avctx, AV_LOG_WARNING, "Requested frame threading with a "
+ "custom get_buffer2() implementation which is not marked as "
+ "thread safe. This is not supported anymore, make your "
+ "callback thread-safe.\n");
+ }
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
avctx->codec = codec;
if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
avctx->codec_id == AV_CODEC_ID_NONE) {