]> git.sesse.net Git - vlc/commitdiff
mkv.cpp: Fix a problem when entering a chapter after the previous chapter produced...
authorSteve Lhomme <robux@videolan.org>
Sun, 24 Apr 2005 18:45:35 +0000 (18:45 +0000)
committerSteve Lhomme <robux@videolan.org>
Sun, 24 Apr 2005 18:45:35 +0000 (18:45 +0000)
modules/demux/mkv.cpp

index a5b2bc48a3824ee72a555eba23268e764ebd8427..0e1804ab1a81690ec0c708c59fb1486ba040adbc 100644 (file)
@@ -1926,6 +1926,7 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
                     // only seek if necessary
                     if ( psz_current_chapter == NULL || (psz_current_chapter->i_end_time != psz_curr_chapter->i_start_time) )
                         Seek( demux, sys.i_pts, 0, psz_curr_chapter );
+                    psz_current_chapter = psz_curr_chapter;
                 }
             }
             else if ( psz_curr_chapter->i_seekpoint_num > 0 )
@@ -1933,9 +1934,13 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
                 demux.info.i_update |= INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
                 demux.info.i_title = sys.i_current_title = i_sys_title;
                 demux.info.i_seekpoint = psz_curr_chapter->i_seekpoint_num - 1;
+                psz_current_chapter = psz_curr_chapter;
+            }
+            else
+            {
+                psz_current_chapter = psz_curr_chapter;
             }
 
-            psz_current_chapter = psz_curr_chapter;
             return true;
         }
     }