[PATCH 05/11] mgcp: Add RTP audio transcoding

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Thu May 15 19:31:35 UTC 2014


On Wed, May 14, 2014 at 02:44:26PM +0200, Jacob Erlbeck wrote:

> >> +	/* cleanup first */
> >> +	if (state) {
> >> +		talloc_free(state);
> >> +		dst_end->rtp_process_data = NULL;
> > 
> > 		state = NULL;
> >> +	}
> > 
> > 
> > Or just avoid assigning state that early?
> 
> This might called multiply during a single call and this way does a full
> transcoding reset every time including cleaning up and disabling it when
> called with src_end == NULL.

Yes, my question was maybe use if (dst_end->rtp_process_data) and assign
state only after it. What we should avoid is having state be a dangling
pointer.





More information about the OpenBSC mailing list