[vlc-commits] MKV: Don't delete es at EOF in Demux() but in Close()

Denis Charmet git at videolan.org
Tue Jan 24 01:41:07 CET 2012


vlc | branch: master | Denis Charmet <typx at dinauz.org> | Tue Jan 24 01:24:49 2012 +0100| [8e141adb83f3f8d40a141969890b0bff84757ab7] | committer: Jean-Baptiste Kempf

MKV: Don't delete es at EOF in Demux() but in Close()

Fix the second part of #5896

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

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

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

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 67af69e..443c38c 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -257,6 +257,13 @@ static void Close( vlc_object_t *p_this )
 {
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys   = p_demux->p_sys;
+    virtual_segment_c *p_vsegment = p_sys->p_current_segment;
+    if( p_vsegment )
+    {
+        matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
+        if( p_segment )
+            p_segment->UnSelect();
+    }
 
     delete p_sys;
 }
@@ -692,8 +699,6 @@ static int Demux( demux_t *p_demux)
             else
             {
                 msg_Warn( p_demux, "cannot get block EOF?" );
-                p_segment->UnSelect();
-
                 es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
                 break;
             }



More information about the vlc-commits mailing list