Skip to content

Commit e195bc2

Browse files
committed
Convert captured frame to RGB8
1 parent 2a2f84d commit e195bc2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/theora/movie_writer_ogv.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ void MovieWriterOGV::pull_audio(const bool last) {
6969
}
7070

7171
void MovieWriterOGV::push_video(const Ref<Image> &p_image) {
72+
if (p_image->get_format() != Image::FORMAT_RGB8) {
73+
p_image->convert(Image::FORMAT_RGB8);
74+
}
7275
PackedByteArray data = p_image->get_data();
7376
rgb2yuv420(y, u, v, data.ptrw(), p_image->get_width(), p_image->get_height());
7477
th_encode_ycbcr_in(td, ycbcr);

0 commit comments

Comments
 (0)