[vlc-devel] commit: spdif: Add a comment to explicitely explain why we don' t free old buffer. (Pierre d'Herbemont )

jpd at videolan.org jpd at videolan.org
Fri Sep 4 09:42:52 CEST 2009


On Thu, Sep 03, 2009 at 11:31:21PM +0200, git version control wrote:
> vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Thu Sep  3 23:30:53 2009 +0200| [acac88798ee6fd5ec0ea59bdaef0a4989f6409cd] | committer: Pierre d'Herbemont 
[snip]
>      aout_buffer_t * p_old_buffer = aout_FifoPop( NULL, &p_input->fifo );
> +    /* We don't free the old buffer because,
> +     * The aout core use a hack to avoid useless memcpy: the buffer in which
> +     * to mix is the same as the one in the first active input fifo.
> +     * So the ownership of that buffer belongs to our caller */

Had to read it a couple of times to understand what it means. Would this
be correct?

	/* We do not free the old buffer because we don't own it. We don't
	 * own it because the aout core uses a hack to avoid a memcpy by
	 * giving us the first active input fifo buffer to mix in. */




More information about the vlc-devel mailing list