Opened 7 years ago

Closed 7 years ago

#2118 closed defect (fixed)

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 (1)

comment:1 Changed 7 years ago by nanang

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

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.