[vlc-commits] Avoid infinite loop if eof happens during buffering

Denis Charmet git at videolan.org
Wed Feb 1 22:42:36 CET 2012


vlc/vlc-2.0 | branch: master | Denis Charmet <typx at dinauz.org> | Tue Jan 31 23:58:00 2012 +0100| [29a10bd927360efc4569d646c5d58b2f5cfec2e2] | committer: Jean-Baptiste Kempf

Avoid infinite loop if eof happens during buffering

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit b178857361093686ff1844d8405f7560778e90f0)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mkv/mkv.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index fbb7620..104cac8 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -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;
                 }



More information about the vlc-commits mailing list