Ticket #2118 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

Possible insufficient stream buffer size when using Opus

Reported by: nanang Owned by: nanang
Priority: normal Milestone: release-2.8
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Currently stream buffer is calculated from specified codec maximum bitrate with 200 ms frame duration. Unfortunately, for some codecs that supports variable bitrate (VBR) and variable frame length such as Opus, it can be too small as the frame size may become very large exceeding the precalculated stream buffer size, which may lead to buffer overflow issues. Thanks Marcus Froeschl for the report and the analysis.

Change History

comment:1 Changed 5 months ago by nanang

  • Status changed from new to closed
  • Resolution set to fixed

In 5803:

Fixed #2118:

  • Stream buffer calculation is now based on maximum bitrate and maximum receiving frame size.
  • Added buffer size check when getting frame from jitter buffer, pjmedia_jbuf_get_frame*() specification has been updated that 'size' param is now input and output (was output only).
Note: See TracTickets for help on using tickets.