Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1453 closed defect (fixed)

Memory leak in setting default video codec parameters (thanks Bo Shi for the feedback)

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

Description

Calling pjmedia_vid_codec_mgr_set_default_param() multiple times using the same pool instance will cause the pool bloating. This is actually expected behaviour. It was assumed that application won't need to change the default codec param frequently. And if application needs to, it should manage the pool by itself, i.e: create new pool before and release the old one after calling the function, to avoid the pool bloating.

However, after reconsider it again, frequent changes on the default codec param can be common case for video applications, so we think it is better to let the codec framework to manage the pool.

Change History (2)

comment:1 Changed 12 years ago by nanang

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

(In [3956]) Fix #1453:

  • Add and manage pool instance in default codec param in video codec framework.
  • API change: pool param is removed from pjmedia_vid_codec_mgr_set_default_param().

comment:2 Changed 12 years ago by nanang

(In [4008]) Re #1453: fixed memory leak in pjmedia_vid_codec_mgr_set_default_param() caused by unreleased old pool when the new codec param is not NULL (thanks Faba Aa for the report).

Note: See TracTickets for help on using tickets.