Programming Interfaces Guide

Deleting Media From the SDP Media Structure

int sdp_delete_media(sdp_media_t **l_media, sdp_media_t *media);

The sdp_delete_media() function deletes the media entry specified by the media parameter from the media list. This function finds the specified media entry by calling the sdp_find_media() function. This function frees the memory that is allocated to the media structure after deleting the media entry.

Return Values: The sdp_delete_media() function returns 0 when the function completes successfully. When the session argument is NULL or mandatory arguments do not exist, the function returns EINVAL. The value of errno does not change in the event of an error.