[vlc-devel] commit: Use mwait and remove silly msleep usage ( Rémi Denis-Courmont )
Laurent Aimar
fenrir at via.ecp.fr
Sun Sep 7 14:10:51 CEST 2008
On Sun, Sep 07, 2008, git version control wrote:
> vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Sep 7 13:09:13 2008 +0300| [86572816b953e45bcad594fbbd0386b322b7638e] | committer: Rémi Denis-Courmont
>
> Use mwait and remove silly msleep usage
>
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86572816b953e45bcad594fbbd0386b322b7638e
> ---
>
> modules/demux/mjpeg.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
> index 7f76650..5415864 100644
> --- a/modules/demux/mjpeg.c
> +++ b/modules/demux/mjpeg.c
> @@ -386,14 +386,11 @@ static int MjpgDemux( demux_t *p_demux )
> demux_sys_t *p_sys = p_demux->p_sys;
> int i;
>
> - if( p_sys->b_still && p_sys->i_still_end && p_sys->i_still_end < mdate() )
> + if( p_sys->b_still && p_sys->i_still_end )
> {
> /* Still frame, wait until the pause delay is gone */
> + mwait( p_sys->i_still_end );
> p_sys->i_still_end = 0;
> - }
> - else if( p_sys->b_still && p_sys->i_still_end )
> - {
> - msleep( 400 );
> return 1;
> }
The demuxer cannot wait a long time as it will block the input thread.
Play/pause/... will not work while the mwait is executed. With delay > 300ms
it can become very annoying.
--
fenrir
More information about the vlc-devel
mailing list