obs-ffmpeg/ffmpeg-mux: Fix splitting hang on Windows
stdout on Windows from a subprocess requires that something read the stdout buffer, and currently we don't do that. Due to newly introduced printf/fprintf calls, the stdout buffer eventually fills up because nothing is emptying it, thus the muxer locks up on an fprintf/printf call and causes OBS itself to hang.
This commit is contained in:
parent
72224f0fae
commit
a4c215869f
@ -670,9 +670,12 @@ static int ffmpeg_mux_init_context(struct ffmpeg_mux *ffm)
|
||||
ffm->params.printable_file.array);
|
||||
return FFM_ERROR;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FFMPEG_MUX_DEBUG
|
||||
printf("info: Output format name and long_name: %s, %s\n",
|
||||
output_format->name ? output_format->name : "unknown",
|
||||
output_format->long_name ? output_format->long_name : "unknown");
|
||||
#endif
|
||||
|
||||
ret = avformat_alloc_output_context2(&ffm->output, output_format, NULL,
|
||||
ffm->params.file);
|
||||
@ -835,7 +838,9 @@ static inline bool read_change_file(struct ffmpeg_mux *ffm, uint32_t size,
|
||||
}
|
||||
filename->buf[size] = 0;
|
||||
|
||||
#ifdef ENABLE_FFMPEG_MUX_DEBUG
|
||||
fprintf(stderr, "info: New output file name: %s\n", filename->buf);
|
||||
#endif
|
||||
|
||||
int ret;
|
||||
char *argv1_backup = argv[1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user