Initialize recv_hook_ to nullptr

There's a race condition between creating a stream (starting the
frame receiver) and installing a receive hook. Previously the recv_hook_
pointer contained garbage which caused problems especially on Windows.
This commit is contained in:
Aaro Altonen 2020-04-14 08:58:44 +03:00
parent fc105da611
commit e2b72d4043
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,8 @@ kvz_rtp::receiver::receiver(kvz_rtp::socket& socket, rtp_ctx_conf& conf, rtp_for
socket_(socket),
rtp_(rtp),
conf_(conf),
fmt_(fmt)
fmt_(fmt),
recv_hook_(nullptr)
{
}