vlc | branch: master | Steve Lhomme <[email protected]> | Thu Feb 15 14:50:30 
2018 +0100| [56ceba435f4e8c87aabbaa62f4352c6aa7ef0e8a] | committer: Steve Lhomme

demux:mkv: parse the first Cluster when we look for the duration

Since we don't preload it by default anymore

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

 modules/demux/mkv/matroska_segment.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/mkv/matroska_segment.cpp 
b/modules/demux/mkv/matroska_segment.cpp
index 95d160e6e2..67111c30de 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -1022,7 +1022,12 @@ void matroska_segment_c::EnsureDuration()
         }
 
         if( MKV_IS_ID( el, KaxCluster ) )
+        {
             i_last_cluster_pos = el->GetElementPosition();
+            if ( i_last_cluster_pos == cluster->GetElementPosition() )
+                // make sure our first Cluster has a timestamp
+                ParseCluster( cluster, false, SCOPE_PARTIAL_DATA );
+        }
     }
 
     // find the last timecode in the Cluster

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to