[vlc-devel] commit: Improved eof detection on a few broken avi files. (Laurent Aimar )

git version control git at videolan.org
Wed Aug 27 12:09:49 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Aug 27 01:47:03 2008 +0200| [2b1be1cce1cb41fa187281ec8eb4b33b58ee51c4] | committer: Laurent Aimar 

Improved eof detection on a few broken avi files.

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

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

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 2d8975c..9e509f0 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -935,7 +935,13 @@ static int Demux_Seekable( demux_t *p_demux )
 
         if( b_done )
         {
-            return( 1 );
+            for( i = 0; i < p_sys->i_track; i++ )
+            {
+                if( toread[i].b_ok )
+                    return 1;
+            }
+            msg_Warn( p_demux, "all tracks have failed, exiting..." );
+            return 0;
         }
 
         if( i_pos == -1 )




More information about the vlc-devel mailing list