From 24278072a99a6df1e32c96f2df3c4c708af1cdda Mon Sep 17 00:00:00 2001 From: Bernat Arlandis Date: Thu, 13 Feb 2025 15:34:00 +0100 Subject: [PATCH] Replace memnew with instantiate --- modules/theora/video_stream_theora.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 908bef17f7b..02a1c7f8687 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -74,7 +74,8 @@ void VideoStreamPlaybackTheora::video_write(th_ycbcr_buffer yuv) { yuv420_2_rgb8888((uint8_t *)dst, (uint8_t *)yuv[0].data + y_offset, (uint8_t *)yuv[1].data + uv_offset, (uint8_t *)yuv[2].data + uv_offset, region.size.x, region.size.y, yuv[0].stride, yuv[1].stride, region.size.x << 2); } - Ref img = memnew(Image(region.size.x, region.size.y, false, Image::FORMAT_RGBA8, frame_data)); //zero copy image creation + Ref img; + img.instantiate(region.size.x, region.size.y, false, Image::FORMAT_RGBA8, frame_data); //zero copy image creation texture->update(img); //zero copy send to rendering server }