Skip to content

Commit

Permalink
video_rxtx: don't unregister callb. if not regist.
Browse files Browse the repository at this point in the history
Do not unregister the should_exit callback if not registsterd. This
occurs eg. when invalid host was entered, like: `uv blah`.
  • Loading branch information
MartinPulec committed Jun 28, 2024
1 parent b4bf412 commit 0a0b14e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video_rxtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ static void should_exit_video_rxtx(void *state) {

video_rxtx::~video_rxtx() {
join();
unregister_should_exit_callback(m_parent, should_exit_video_rxtx, this);
if (!m_poisoned && m_compression) {
send(NULL);
compress_pop(m_compression);
Expand All @@ -139,6 +138,7 @@ void video_rxtx::join() {
}
send(NULL); // pass poisoned pill
pthread_join(m_thread_id, NULL);
unregister_should_exit_callback(m_parent, should_exit_video_rxtx, this);
m_joined = true;
}

Expand Down

0 comments on commit 0a0b14e

Please sign in to comment.