• José Luis Millán's avatar
    #196. Fix crash in Consumer::getStats() · 65088615
    由 José Luis Millán 提交于
    Scenario:
    
    `Consumer::RemoveProfile()` is called with the profile pointed by `targetProfile`.
    The corresponding entry is erased from `mapProfileRtpStream` container.
    
    `targetProfile` is not being cleared, and here resides the bug.
    
    Few RTP packets later a packet with the profile pointed by `targetProfile` comes
    in `SendRtpPacket()`. We were waiting for it, so we make such profile the
    `effectiveProfile`. At this point `effectiveProfile` points to a profile which
    is not present in `mapProfileRtpStream` and this crash will happen on the next
    call to `GetStats()`.
    65088615
Consumer.cpp 26.7 KB