mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 21:40:15 +00:00
fixed CID 424188, 42421{0,1,2,6}
COPY_INSTEAD_OF_MOVE
This commit is contained in:
@@ -154,7 +154,7 @@ void state_transcoder_decompress::worker()
|
||||
if(!frame){
|
||||
should_exit = true;
|
||||
} else {
|
||||
recompress_process_async(recompress, frame);
|
||||
recompress_process_async(recompress, std::move(frame));
|
||||
}
|
||||
|
||||
// we are removing from queue now because special messages are "accepted" when queue is empty
|
||||
|
||||
@@ -170,7 +170,7 @@ static void recompress_port_write(recompress_output_port& port, shared_ptr<video
|
||||
port.frames = 0;
|
||||
}
|
||||
|
||||
port.video_rxtx->send(frame);
|
||||
port.video_rxtx->send(std::move(frame));
|
||||
}
|
||||
|
||||
static void recompress_worker(struct recompress_worker_ctx *ctx){
|
||||
|
||||
@@ -134,7 +134,8 @@ struct video_frame *video_frame_pool::get_pod_frame() {
|
||||
for (unsigned int i = 0; i < frame->tile_count; ++i) {
|
||||
out->tiles[i].data = frame->tiles[i].data;
|
||||
}
|
||||
out->callbacks.dispose_udata = new std::shared_ptr<video_frame>(frame);
|
||||
out->callbacks.dispose_udata =
|
||||
new std::shared_ptr<video_frame>(std::move(frame));
|
||||
static auto deleter = [](video_frame *f) { delete static_cast<std::shared_ptr<video_frame> *>(f->callbacks.dispose_udata); };
|
||||
out->callbacks.data_deleter = deleter;
|
||||
return out;
|
||||
|
||||
@@ -891,7 +891,7 @@ void vidcap_state_aja::CaptureFrames (void)
|
||||
if (out->color_spec == R12L) {
|
||||
shared_ptr<video_frame> converted = mPool.get_frame();
|
||||
vc_copylineR12AtoR12L((unsigned char *) converted->tiles[0].data, (unsigned char *) out->tiles[0].data, out->tiles[0].data_len, 0, 0, 0);
|
||||
out = converted;
|
||||
out = std::move(converted);
|
||||
}
|
||||
|
||||
if (log_level >= LOG_LEVEL_DEBUG) {
|
||||
|
||||
@@ -828,7 +828,10 @@ void* display_vulkan_init(module* parent, const char* fmt, unsigned int flags) {
|
||||
}
|
||||
#endif
|
||||
s->vulkan = new vkd::VulkanDisplay{};
|
||||
s->vulkan->init(std::move(instance), vk::SurfaceKHR(surface), initial_frame_count, *s->window_callback, args.gpu_idx, path_to_shaders, args.vsync, args.tearing_permitted);
|
||||
s->vulkan->init(std::move(instance), vk::SurfaceKHR(surface),
|
||||
initial_frame_count, *s->window_callback,
|
||||
args.gpu_idx, std::move(path_to_shaders),
|
||||
args.vsync, args.tearing_permitted);
|
||||
LOG(LOG_LEVEL_NOTICE) << MOD_NAME "Vulkan display initialised." << std::endl;
|
||||
}
|
||||
catch (std::exception& e) { log_and_exit_uv(e); return nullptr; }
|
||||
|
||||
Reference in New Issue
Block a user