[vlc-commits] mkv: use do/while-zero for impossible loop

Rémi Denis-Courmont git at videolan.org
Tue Apr 22 23:36:31 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 23 00:35:18 2014 +0300| [2374bacf5d923dc69f06b3dbdc41bc1f99b9c530] | committer: Rémi Denis-Courmont

mkv: use do/while-zero for impossible loop

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

 modules/demux/mkv/mkv.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index ef6a501..b2b85bb 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -707,7 +707,7 @@ static int Demux( demux_t *p_demux)
     }
     int i_return = 0;
 
-    for( ;; )
+    do
     {
         if( p_sys->i_pts >= p_sys->i_start_pts  )
             if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
@@ -795,6 +795,7 @@ static int Demux( demux_t *p_demux)
         vlc_mutex_unlock( &p_sys->lock_demuxer );
         return 1;
     }
+    while (0);
 
     vlc_mutex_unlock( &p_sys->lock_demuxer );
 



More information about the vlc-commits mailing list