Skip to content

Commit

Permalink
hd-rum-transcode: fixed exitting on init err
Browse files Browse the repository at this point in the history
Fixes endless wait in hd_rum_decompress_done() when running
`
hd-rum-transcode 8M 5004 nonexistent
`
because the thread is not exited if registered should_exit callbacks
are not run.

This issue was present since 23-03-2023 (commit 449251a or something
around).
  • Loading branch information
MartinPulec committed Sep 20, 2023
1 parent 86ba2cc commit fca6833
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/hd-rum-translator/hd-rum-translator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,16 @@ static void hd_rum_translator_should_exit_callback(void *arg) {
*should_exit = true;
}

#define EXIT(retval) { hd_rum_translator_deinit(&state); if (sock_in != nullptr) udp_exit(sock_in); common_cleanup(init); return retval; }
#define EXIT(retval) \
{ \
exit_uv(0); \
hd_rum_translator_deinit(&state); \
if (sock_in != nullptr) \
udp_exit(sock_in); \
common_cleanup(init); \
return retval; \
}

int main(int argc, char **argv)
{
struct init_data *init;
Expand Down

0 comments on commit fca6833

Please sign in to comment.