Skip to content

Commit 92d4325

Browse files
committed
Extra checks on 0 size source
1 parent b588b63 commit 92d4325

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source-record.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ static void source_record_filter_tick(void *data, float seconds)
12911291
width += (width & 1);
12921292
uint32_t height = obs_source_get_height(parent);
12931293
height += (height & 1);
1294-
if (context->width != width || context->height != height || (!context->video_output && width && height)) {
1294+
if (width && height && (!context->video_output || context->width != width || context->height != height)) {
12951295
struct obs_video_info ovi = {0};
12961296
obs_get_video_info(&ovi);
12971297

@@ -1346,7 +1346,7 @@ static void source_record_filter_tick(void *data, float seconds)
13461346
} else if (!context->output_active && obs_source_enabled(context->source) &&
13471347
(context->replayBuffer || context->record || context->stream)) {
13481348
if (context->starting_file_output || context->starting_stream_output || context->starting_replay_output ||
1349-
!context->video_output)
1349+
!context->video_output || !width || !height)
13501350
return;
13511351
obs_data_t *s = obs_source_get_settings(context->source);
13521352
update_encoder(context, s);

0 commit comments

Comments
 (0)