[vlc-devel] [PATCH 8/9] avcodec: video: remove i_used variable as send_packet consumes all

Ilkka Ollakka ileoo at videolan.org
Mon Sep 5 09:39:44 CEST 2016


On Sun, Sep 04, 2016 at 03:21:32PM +0200, Thomas Guillem wrote:


> On Sun, Sep 4, 2016, at 14:34, ileoo at videolan.org wrote:
> >              /* Consumed bytes */
> > -            p_block->i_buffer -= i_used;
> > -            p_block->p_buffer += i_used;
> > +            p_block->p_buffer += p_block->i_buffer;
> > +            p_block->i_buffer = 0;

> Shouldn't you set pp_block to NULL instead ?

Could be better thing to do. the whole thing is inside while-loop and
it's conditions are littlebit on the non-trivial side currently.

-- 
Ilkka Ollakka
... I don't like FRANK SINATRA or his CHILDREN.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160905/cc0a0aa7/attachment.sig>


More information about the vlc-devel mailing list