[jitsi-dev] [jitsi-videobridge] Prevent NullPointerException when there are no simulcast source groups. (#134)


#1

The main for loop at line 894 short circuits if a source group does not
have a simulcast semantic. If there are no simulcast source groups at
all, the ssrc2stream hash map is never populated, triggering a NPE
after the main for loop.

This change detects that there were no simulcast groups and skips
running those final steps.
You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/jitsi-videobridge/pull/134

-- Commit Summary --

  * Prevent NullPointerException when there are no simulcast source groups.

-- File Changes --

    M src/main/java/org/jitsi/videobridge/VideoChannel.java (20)

-- Patch Links --

https://github.com/jitsi/jitsi-videobridge/pull/134.patch
https://github.com/jitsi/jitsi-videobridge/pull/134.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/134


#2

Thank you for the fix!

Do I correctly understand that the NPE is due to simulcastStream being null on line 923? If that's the case, I think an NPE could still occur in the case where there are some SIM groups, but there is also a FID group for an SSRC not in a SIM group, for example something like:
SIM 1 2
FID 1 3
FID 2 4
FID 100 200

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/134#issuecomment-187398307


#3

Correct.

The case we've been dealing with is when we have FID groups, but no SIM groups.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/134#issuecomment-187401278


#4

Cool, thanks!

I need your contributor agreement (CLA) before I can merge, and I can't find it. You can sign the [individual](https://jitsi.org/icla) or [corporate](https://jitsi.org/ccla) version. If you have already signed it, please let me know of the name that was used.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/134#issuecomment-187405834


#5

Just signed as individual, under Lance Stout

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/134#issuecomment-187409022


#6

Merged #134.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/134#event-562387441


#7

Thank you!

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/134#issuecomment-187905919