[vlc-commits] demux: avi:fix block reading

Francois Cartegnie git at videolan.org
Mon Sep 22 20:20:18 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Sep 18 23:25:23 2014 +0200| [d4c5f2dcd6a2df117b18422e2c50691e48be9707] | committer: Francois Cartegnie

demux: avi:fix block reading

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

 modules/demux/avi/avi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index b04e966..2d16936 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1027,10 +1027,12 @@ static int Demux_Seekable( demux_t *p_demux )
         {
             toread[i_track].i_toread = AVI_PTSToByte( tk, i_dpts );
         }
-        else
+        else if ( i_dpts > -2 * CLOCK_FREQ ) /* don't send a too early dts (low fps video) */
         {
             toread[i_track].i_toread = AVI_PTSToChunk( tk, i_dpts );
         }
+        else
+            toread[i_track].i_toread = -1;
     }
 
     for( ;; )
@@ -1052,7 +1054,7 @@ static int Demux_Seekable( demux_t *p_demux )
                 continue;
             }
 
-            if( toread[i].i_toread > 0 )
+            if( toread[i].i_toread >= 0 )
             {
                 b_done = false; /* not yet finished */
             }



More information about the vlc-commits mailing list