[vlc-commits] demux: avi: fix infinite loop

Francois Cartegnie git at videolan.org
Tue Apr 30 19:45:31 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 30 19:20:05 2019 +0200| [daacb8a79765d3d5e78261e9dedc3bc767d682af] | committer: Francois Cartegnie

demux: avi: fix infinite loop

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

 modules/demux/avi/avi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 62b5e89d0d..c6198c8c5a 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1036,7 +1036,7 @@ static int Demux_Seekable( demux_t *p_demux )
         {
             for( i = 0; i < p_sys->i_track; i++ )
             {
-                if( toread[i].b_ok )
+                if( toread[i].b_ok && toread[i].i_toread >= 0 )
                     return VLC_DEMUXER_SUCCESS;
             }
             msg_Warn( p_demux, "all tracks have failed, exiting..." );



More information about the vlc-commits mailing list