diff options
Diffstat (limited to 'src/input/libreal/sdpplin.c')
-rw-r--r-- | src/input/libreal/sdpplin.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/input/libreal/sdpplin.c b/src/input/libreal/sdpplin.c index 019237243..d58a3d1fe 100644 --- a/src/input/libreal/sdpplin.c +++ b/src/input/libreal/sdpplin.c @@ -15,12 +15,9 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: sdpplin.c,v 1.8 2006/12/25 16:21:56 dgp85 Exp $ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * sdp/sdpplin parser. - * */ #define LOG_MODULE "sdpplin" @@ -32,7 +29,7 @@ #include "rmff.h" #include "rtsp.h" #include "sdpplin.h" -#include "xineutils.h" +#include <xine/xineutils.h> /* * Decodes base64 strings (based upon b64 package) @@ -202,8 +199,7 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) { if(filter(*data,"a=OpaqueData:buffer;",&buf)) { decoded = b64_decode(buf, decoded, &(desc->mlti_data_size)); if ( decoded != NULL ) { - desc->mlti_data = malloc(sizeof(char)*desc->mlti_data_size); - memcpy(desc->mlti_data, decoded, desc->mlti_data_size); + desc->mlti_data = xine_memdup(decoded, desc->mlti_data_size); handled=1; *data=nl(*data); lprintf("mlti_data_size: %i\n", desc->mlti_data_size); @@ -297,7 +293,7 @@ sdpplin_t *sdpplin_parse(char *data) { if(filter(data,"a=StreamCount:integer;",&buf)) { desc->stream_count=atoi(buf); - desc->stream = malloc(sizeof(sdpplin_stream_t*)*desc->stream_count); + desc->stream = calloc(desc->stream_count, sizeof(sdpplin_stream_t*)); handled=1; data=nl(data); } |