Skip to content

Commit

Permalink
Source: Do not log empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
univrsal committed Nov 8, 2023
1 parent 34c98c5 commit 203ab41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mpv-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ void mpvs_handle_events(struct mpv_source* context)
char* end = txt + strlen(txt) - 1;
if (*end == '\n')
*end = '\0';
obs_log(mpvs_mpv_log_level_to_obs(msg->log_level), "log: %s", txt);
if (strlen(txt) > 0)
obs_log(mpvs_mpv_log_level_to_obs(msg->log_level), "log: %s", txt);
bfree(txt);
}
continue;
Expand Down

0 comments on commit 203ab41

Please sign in to comment.