Dummy publishers leaking

Profiled a leak and got following refcount info:
[plugins/janus_videoroom.c:janus_videoroom_create_dummy_publisher:3149:init] 0x615000196b38 (1)
[plugins/janus_videoroom.c:janus_videoroom_create_dummy_publisher:3169:increase] 0x615000196b38 (2)
[plugins/janus_videoroom.c:janus_videoroom_create_dummy_publisher:3215:increase] 0x615000196b38 (3)
[plugins/janus_videoroom.c:janus_videoroom_create_dummy_publisher:3248:increase] 0x615000196b38 (4)
[plugins/janus_videoroom.c:janus_videoroom_publisher_dereference:2751:decrease] 0x615000196b38 (3)

There are many such cases, so it seems that it’s either a leak or we use dummy publishers somehow wrong.

Are you destroying the room dummy publishers are in?

Yes, we have dummy publishers in the room that we destroy.
I also noticed that creation of publisher stream for dummy publisher does janus_refcount_increase(&publisher->ref); but janus_videoroom_publisher_stream_free doesn’t decrement it - looks suspicious for me.

Then please open an issue on GitHub and I’ll have a look when I have some time.

1 Like