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
obs-ffmpeg: Fix SRT listener bug #10508
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message nit:
- obs -> OBS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting nit.
The commit message body still says Will need someone to test this and make sure the code changes make sense. Nothing jumps out to me at a glance, but a second set of eyes wouldn't hurt. |
Unfortunately, this does not appear fully fixed. Here's what I'm seeing on Ubuntu 22.04:
It completely fails to shut down the socket if I connect a client, then disconnect the client, then try stopping stream or shutting down OBS. To be completely honest, I think we need to just remove rendezvous and listener modes from our SRT output. |
@tt2468 i tested on win 11 and didn't get that segmentation fault. Unfortunately i don't have a ubuntu 22.04 distro to test with. I'll investigate more on my side with win 11 to see if there are errors i overlooked. |
Fixes obsproject#10504. There was a bug in FFmpeg implementation which was hidden by a bug in libsrt; it was fixed in a recent commit [1]. When we ported FFmpeg libsrt.c to obs, we brought the said bug along. When starting an SRT stream in listener mode, if no connection is made by a client, there were two issues: - 1) obs was stuck into a connecting loop, - 2) the socket was not closed when exiting OBS. This fixes the issue so that SRT is displaying that a stream started when in listener mode even if NO client is connected. This is the correct behaviour for a listener. The stream now closes properly. [1] https://git.videolan.org/?p=ffmpeg.git;a=commit;h=87677c2195e86b126c3438439a05d0a46ae5bb50 Signed-off-by: pkv <[email protected]>
@tt2468 the FFmpeg bug for the listener was exactly our issue.
|
Description
Fixes #10504.
When starting an SRT stream in listener mode, if no connection is made by a client, the socket was not closed when exiting obs. This fixes the issue so that SRT is closed properly.
Motivation and Context
Bugs are bad.
How Has This Been Tested?
Bug is fixed.
SRT in caller mode still works.
Types of changes
Checklist: