[vlc-devel] [PATCH] avformat: use av_malloc() for io buffer (fix #16379)
Jean-Baptiste Kempf
jb at videolan.org
Sat Jan 16 18:58:40 CET 2016
Merged, thanks.
On 14 Jan, Hannes Domani wrote :
> ---
> modules/demux/avformat/demux.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
> index 14add14..424d854 100644
> --- a/modules/demux/avformat/demux.c
> +++ b/modules/demux/avformat/demux.c
> @@ -286,7 +286,7 @@ int OpenDemux( vlc_object_t *p_this )
> p_sys->p_title = NULL;
>
> /* Create I/O wrapper */
> - unsigned char * p_io_buffer = malloc( AVFORMAT_IOBUFFER_SIZE );
> + unsigned char * p_io_buffer = av_malloc( AVFORMAT_IOBUFFER_SIZE );
> if( !p_io_buffer )
> {
> free( psz_url );
> @@ -297,7 +297,7 @@ int OpenDemux( vlc_object_t *p_this )
> p_sys->ic = avformat_alloc_context();
> if( !p_sys->ic )
> {
> - free( p_io_buffer );
> + av_free( p_io_buffer );
> free( psz_url );
> CloseDemux( p_this );
> return VLC_ENOMEM;
> @@ -307,7 +307,7 @@ int OpenDemux( vlc_object_t *p_this )
> AVFORMAT_IOBUFFER_SIZE, 0, p_demux, IORead, NULL, IOSeek );
> if( !pb )
> {
> - free( p_io_buffer );
> + av_free( p_io_buffer );
> free( psz_url );
> CloseDemux( p_this );
> return VLC_ENOMEM;
> --
> 2.7.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list