Skip to content

Commit 2427807

Browse files
committed
Replace memnew with instantiate
1 parent 5b67dda commit 2427807

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/theora/video_stream_theora.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ void VideoStreamPlaybackTheora::video_write(th_ycbcr_buffer yuv) {
7474
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);
7575
}
7676

77-
Ref<Image> img = memnew(Image(region.size.x, region.size.y, false, Image::FORMAT_RGBA8, frame_data)); //zero copy image creation
77+
Ref<Image> img;
78+
img.instantiate(region.size.x, region.size.y, false, Image::FORMAT_RGBA8, frame_data); //zero copy image creation
7879

7980
texture->update(img); //zero copy send to rendering server
8081
}

0 commit comments

Comments
 (0)