[vlc-devel] [PATCH] access: add rfb/vnc viewonly module.
Rémi Denis-Courmont
remi at remlab.net
Tue Feb 26 19:35:50 CET 2013
Le mardi 26 février 2013 20:22:59, Francois Cartegnie a écrit :
> >> + for(;;)
> >> + {
> >> + if (! p_sys->p_block )
> >> + {
> >> + p_sys->p_block = block_Alloc( p_sys->i_framebuffersize );
> >> + msleep( p_sys->i_frame_interval );
> >
> > WTF is this non-sense?
> >
> > I'm stopping here.
> > Come back when you've applied your critics to your own self.
>
> As long as the block could not be allocated that loop would top 100%
> cpu.
If you cannot allocate the buffer (and you don't irrate the OOM killer), you
need to skip the frame, or otherwise drop the connection and terminate the
stream.
Sleeping will only acccumulate data in the network queues until the connection
fails due to congestion control error. That makes no sense.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list