[vlc-devel] commit: Allowed user to cancel avi index creation. (Laurent Aimar )

git version control git at videolan.org
Mon Aug 18 19:39:23 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Aug 18 13:20:39 2008 +0200| [ec79cd93c8339cd499d2fa2934fa74ee097db80e] | committer: Laurent Aimar 

Allowed user to cancel avi index creation.

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

 modules/demux/avi/avi.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index c6a2701..6579abd 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -2396,9 +2396,12 @@ static void AVI_IndexCreate( demux_t *p_demux )
         if( !vlc_object_alive (p_demux) )
             break;
 
-        /* Don't update dialog too often */
+        /* Don't update/check dialog too often */
         if( i_dialog_id > 0 && mdate() - i_dialog_update > 100000 )
         {
+            if( intf_ProgressIsCancelled( p_demux, i_dialog_id ) )
+                break;
+
             int64_t i_pos = stream_Tell( p_demux->s )* 100 /
                             stream_Size( p_demux->s );
             float f_pos = (float)i_pos;




More information about the vlc-devel mailing list