felicemarra
New Member
I'm trying to write a plugin.
If I try to write a frame 640x360 everything is ok... but If I increase the resolution it crash..
1280x720 crash
1920x1080 crash
640x360 works
It crash on copying frame. So I understand output frame is not so big as source frame. Where can I set the output frame size?
If I try to write a frame 640x360 everything is ok... but If I increase the resolution it crash..
1280x720 crash
1920x1080 crash
640x360 works
Code:
const int width = 640;
const int height = 360;
uint8_t pixels[width * height * 4];
uint64_t cur_time = os_gettime_ns();
obs_source_frame frame = {};
frame.data[0] = pixels;
frame.linesize[0] = width * 4;
frame.format = VIDEO_FORMAT_BGRA;
frame.full_range = false;
frame.width = width;
frame.height = height;
frame.timestamp = os_gettime_ns();
for (int x = 0; x < width* height* 4; x++) {
*(pixels + x) = 255;
}
obs_source_output_video(source, &frame);
It crash on copying frame. So I understand output frame is not so big as source frame. Where can I set the output frame size?