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

Ludovic Fauvet etix at videolan.org
Fri Dec 5 12:24:39 CET 2014


Hi Tristan,

On Wed, Dec 3, 2014, at 21:03, Tristan Matthews wrote:
> > > +
>> > > + /* Feed mpg123 with raw data */ + i_err = mpg123_feed(
>> > > p_sys->p_handle, p_block->p_buffer, + p_block->i_buffer ); + +
>> > > if( i_err != MPG123_OK ) + { + msg_Err( p_dec, "mpg123_feed
>> > > failed: %s", mpg123_plain_strerror( i_err ) ); + block_Release(
>> > > p_block ); + return NULL; + } + + /* Get details about the stream
>> > > */ + i_err = mpg123_info( p_sys->p_handle, &p_sys->frame_info );
>> > > + + if( i_err == MPG123_NEED_MORE ) + { + /* Need moar data */ +
>> > > return NULL;
>
> Should block_Release( p_block ) be called here or am I missing
> something?

That's absolutely right. I wrongly took the mpeg_audio module as an
example but it does use some helpers that are releasing blocks behind
your back in this case.

Thanks.
--
Ludovic Fauvet www.videolan.org


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


More information about the vlc-devel mailing list