[vlc-devel] commit: Reduced sleep while waiting for a frame in transcode. ( Laurent Aimar )

git version control git at videolan.org
Sun Jun 14 20:36:38 CEST 2009


vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Sat Jun 13 13:22:49 2009 +0200| [ad1200690bc448928581357aa6bcaf12096dbe63] | committer: Jean-Baptiste Kempf 

Reduced sleep while waiting for a frame in transcode.

 It vastly improves CPU usage but it does not fix the underlaying problem
of using sleep instead of a signal.

manually cherry-picked by jb at videolan.org

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad1200690bc448928581357aa6bcaf12096dbe63
---

 modules/stream_out/transcode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stream_out/transcode.c b/modules/stream_out/transcode.c
index b4bf891..818d28c 100644
--- a/modules/stream_out/transcode.c
+++ b/modules/stream_out/transcode.c
@@ -2158,7 +2158,7 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring,
         {
             /* Encoder still has stuff to encode, wait to clear-up the list */
             while( p_sys->i_first_pic == i_first_pic )
-                msleep( 100000 );
+                msleep( 5000 );
         }
 
         /* Find an empty space in the picture ring buffer */




More information about the vlc-devel mailing list