[vlc-devel] [PATCH] Add MPEG audio layer I, II, III decoder based on mpg123

Tristan Matthews le.businessman at gmail.com
Fri Dec 5 18:01:25 CET 2014


Also....

+    /* Request a new audio buffer */
> +    block_t *p_out = decoder_NewAudioBuffer( p_dec, p_block->i_nb_samples
> );
> +    if( unlikely( !p_out ) )
>

...leaking p_block here...


> +        return NULL;
> +
> +    /* Configure the buffer */
> +    p_out->i_nb_samples = p_block->i_nb_samples;
> +    p_out->i_dts = p_out->i_pts = date_Get( &p_sys->end_date );
> +    p_out->i_length = date_Increment( &p_sys->end_date,
> p_block->i_nb_samples )
> +        - p_out->i_pts;
> +
> +    /* Make mpg123 write directly into the VLC output buffer */
> +    i_err = mpg123_replace_buffer( p_sys->p_handle, p_out->p_buffer,
> p_out->i_buffer );
> +    if( i_err != MPG123_OK )
> +    {
> +        msg_Err( p_dec, "could not replace buffer: %s",
> mpg123_plain_strerror( i_err ) );
>

...and here.


> +        block_Release( p_out );
>
+        return NULL;
> +    }
> +
>

Best,
Tristan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141205/cb7b6537/attachment.html>


More information about the vlc-devel mailing list