[vlc-devel] [PATCH 2/2] omxil: Allocate the sentinel buffer dynamically

Jean-Baptiste Kempf jb at videolan.org
Fri Apr 13 16:58:23 CEST 2012


On Thu, Apr 12, 2012 at 12:15:55PM +0300, Martin Storsjö wrote :
> -            memset(&p_sys->sentinel_buffer, 0, sizeof(p_sys->sentinel_buffer));
> -            p_sys->sentinel_buffer.nFlags = OMX_BUFFERFLAG_EOS;
> -            OMX_FIFO_PUT(&p_sys->in.fifo, &p_sys->sentinel_buffer);
> +            sentinel = malloc(sizeof(*sentinel));
> +            memset(sentinel, 0, sizeof(*sentinel));
> +            sentinel->nFlags = SENTINEL_FLAG;
> +            OMX_FIFO_PUT(&p_sys->in.fifo, sentinel);

Unchecked malloc?

Best 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