Skip to content

dual jitterbuffer mode causes a segmentation fault on the first call entering rtpengine #2059

@jflemieux227

Description

@jflemieux227

rtpengine version the issue has been seen with

ngcp-rtpengine (14.1.0.0+0~mr14.1.0.0) unstable; urgency=medium

Used distribution and its version

No response

Linux kernel version used

No response

CPU architecture issue was seen on (see uname -m)

None

Expected behaviour you didn't see

Hello, i discovered a bug into mr14.0.1. If i start with --jitter-buffer=1 and --jb-adaptive together, the first call entering rtpengine will cause a segmentation fault. I think the issue is in jitter_buffer.c lines 107-110:
static int get_target_capacity(struct jitter_buffer *jb) {
if (rtpe_config.jb_adaptive && jb->dynamic_capacity > 0)
return jb->dynamic_capacity; // Returns MILLISECONDS
return rtpe_config.jb_length; // Returns PACKETS
}

and on line 238-240:
int packets_to_remove = estimated_burst_size - target_capacity;

i suspect the twin usage of argument causes a seg fault for variables outside range

One should disable the second one or refuse to start i suggest, or at least the doc should mention about it.

Unexpected behaviour you saw

No response

Steps to reproduce the problem

No response

Additional program output to the terminal or logs illustrating the issue

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions