X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fdemux%2Flive555.cpp;h=abc0eddec9bd8f82b4e9cf543e01cf72d31f7446;hb=25232e200b39db62c3e49f9269c215a71873c7f9;hp=cdf6adbe6bc6ba0bae6daf6507c59f8fb2ef809f;hpb=34ad70b430b75ab2db652ef6da67781781bc12ac;p=vlc diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp index cdf6adbe6b..abc0eddec9 100644 --- a/modules/demux/live555.cpp +++ b/modules/demux/live555.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include @@ -368,8 +367,7 @@ static int Open ( vlc_object_t *p_this ) } i_sdp_max += 1000; - p_sdp = (uint8_t*)realloc_or_free( p_sdp, i_sdp_max ); - assert( p_sdp ); + p_sdp = (uint8_t*)xrealloc( p_sdp, i_sdp_max ); } p_sys->p_sdp = (char*)p_sdp; } @@ -868,8 +866,7 @@ static int SessionsSetup( demux_t *p_demux ) i_extra ) ) ) { tk->fmt.i_extra = i_extra; - tk->fmt.p_extra = malloc( i_extra ); - assert( tk->fmt.p_extra ); + tk->fmt.p_extra = xmalloc( i_extra ); memcpy( tk->fmt.p_extra, p_extra, i_extra ); delete[] p_extra; } @@ -889,8 +886,7 @@ static int SessionsSetup( demux_t *p_demux ) i_extra ) ) ) { tk->fmt.i_extra = i_extra; - tk->fmt.p_extra = malloc( i_extra ); - assert( tk->fmt.p_extra ); + tk->fmt.p_extra = xmalloc( i_extra ); memcpy( tk->fmt.p_extra, p_extra, i_extra ); delete[] p_extra; } @@ -948,8 +944,7 @@ static int SessionsSetup( demux_t *p_demux ) i_extra ) ) ) { tk->fmt.i_extra = i_extra; - tk->fmt.p_extra = malloc( i_extra ); - assert( tk->fmt.p_extra ); + tk->fmt.p_extra = xmalloc( i_extra ); memcpy( tk->fmt.p_extra, p_extra, i_extra ); delete[] p_extra; @@ -970,8 +965,7 @@ static int SessionsSetup( demux_t *p_demux ) i_extra ) ) ) { tk->fmt.i_extra = i_extra; - tk->fmt.p_extra = malloc( i_extra ); - assert( tk->fmt.p_extra ); + tk->fmt.p_extra = xmalloc( i_extra ); memcpy( tk->fmt.p_extra, p_extra, i_extra ); delete[] p_extra; } @@ -1034,9 +1028,8 @@ static int SessionsSetup( demux_t *p_demux ) if( tk->p_es || tk->b_quicktime || tk->b_muxed || tk->b_asf ) { /* Append */ - p_sys->track = (live_track_t**)realloc_or_free( p_sys->track, + p_sys->track = (live_track_t**)xrealloc( p_sys->track, sizeof( live_track_t ) * ( p_sys->i_track + 1 ) ); - assert( p_sys->track ); p_sys->track[p_sys->i_track++] = tk; } else @@ -1625,8 +1618,7 @@ static void StreamRead( void *p_private, unsigned int i_size, atomLength <= INT_MAX ) { tk->fmt.i_extra = atomLength-8; - tk->fmt.p_extra = malloc( tk->fmt.i_extra ); - assert( tk->fmt.p_extra ); + tk->fmt.p_extra = xmalloc( tk->fmt.i_extra ); memcpy(tk->fmt.p_extra, pos+8, atomLength-8); break; } @@ -1636,8 +1628,7 @@ static void StreamRead( void *p_private, unsigned int i_size, else { tk->fmt.i_extra = qtState.sdAtomSize - 16; - tk->fmt.p_extra = malloc( tk->fmt.i_extra ); - assert( tk->fmt.p_extra ); + tk->fmt.p_extra = xmalloc( tk->fmt.i_extra ); memcpy( tk->fmt.p_extra, &sdAtom[12], tk->fmt.i_extra ); } }