Skip to content

Commit

Permalink
temporary debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod committed Apr 28, 2024
1 parent edd063d commit 435b7d0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libobs/util/buffered-file-serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ static void *io_thread(void *opaque)
}

if (!chunk_used) {
blog(LOG_WARNING,
"Attempted flushing empty chunk");
blog(LOG_ERROR, "Tried to write 0-byte chunk!");
os_atomic_set_bool(&out->io.output_error, true);
goto error;
}

// Write the current chunk to the output file
Expand Down Expand Up @@ -252,6 +253,13 @@ static size_t file_output_write(void *opaque, const void *buf, size_t buf_size)
{
struct file_output_data *out = opaque;

if (!buf_size || !buf || !out) {
if (!buf_size)
blog(LOG_WARNING, "tried to do 0-byte write!");

return 0;
}

// If the output thread failed, signal that back up the stack
if (os_atomic_load_bool(&out->io.output_error))
return 0;
Expand Down

0 comments on commit 435b7d0

Please sign in to comment.