]> git.sesse.net Git - vlc/commitdiff
Avoid infinite loop if eof happens during buffering
authorDenis Charmet <typx@dinauz.org>
Tue, 31 Jan 2012 22:58:00 +0000 (23:58 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 1 Feb 2012 08:00:51 +0000 (09:00 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/mkv.cpp

index fbb7620ed28742afe14f05aa8db39fca20d5dab1..104cac804e01466cf21495c86d2b188addce8937 100644 (file)
@@ -668,7 +668,7 @@ static int Demux( demux_t *p_demux)
         if( p_sys->i_pts >= p_sys->i_start_pts  )
             if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
             {
-                i_return = 1;
+                i_return = ( i_block_count != 0 );
                 break;
             }
 
@@ -694,7 +694,7 @@ static int Demux( demux_t *p_demux)
                     /* TODO handle successive chapters with the same user_start_time/user_end_time
                     */
                     p_sys->i_pts = p_chap->i_virtual_stop_time;
-                    p_sys->i_pts++; // trick to avoid staying on segments with no duration and no content
+                    p_sys->i_start_pts =  p_sys->i_pts++; // trick to avoid staying on segments with no duration and no content
 
                     i_return = 1;
                 }