Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTPSession copy constructor is broken #13

Closed
suhbataar opened this issue Jun 6, 2018 · 2 comments
Closed

RTPSession copy constructor is broken #13

suhbataar opened this issue Jun 6, 2018 · 2 comments

Comments

@suhbataar
Copy link

RTPSession can be copied with the default copy constructor, which however does the wrong thing. It copies the pointer to RTPRandom instead of cloning the pointed-to object. When one of the copies is destroyed, it deletes the RTPRandom, which will result in access violation or double delete, depending on how the other copy is used.

Probably RTPSession is not meant to be copied, so I suggest you disable the copy constructor and copy assignment operator as described here.

@j0r1
Copy link
Owner

j0r1 commented Jun 24, 2018

I've made changes to a few header files. Does that work for you?

@suhbataar
Copy link
Author

Yes, thanks for fixing! And thank you for this great library, it enabled me to create a simple RTP-Server very quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants