Commit a3e3a2d1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

RTSP: use calloc

parent 64d1913f
......@@ -87,21 +87,13 @@ static void RtspTimeOut( void *data );
rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media,
const char *path )
{
rtsp_stream_t *rtsp = malloc( sizeof( *rtsp ) );
rtsp_stream_t *rtsp = calloc( 1, sizeof( *rtsp ) );
if( rtsp == NULL )
{
if( unlikely(rtsp == NULL) )
return NULL;
}
rtsp->owner = owner;
rtsp->vod_media = media;
rtsp->sessionc = 0;
rtsp->sessionv = NULL;
rtsp->host = NULL;
rtsp->url = NULL;
rtsp->psz_path = NULL;
rtsp->track_id = 0;
vlc_mutex_init( &rtsp->lock );
rtsp->timeout = var_InheritInteger(owner, "rtsp-timeout");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment