vlc/vlc-3.0 | branch: master | Steve Lhomme <[email protected]> | Thu Feb 15 
14:50:30 2018 +0100| [ec0ae5b5ef8d09bea7882e90e858df163b23176a] | committer: 
Thomas Guillem

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

Since we don't preload it by default anymore

(cherry picked from commit 56ceba435f4e8c87aabbaa62f4352c6aa7ef0e8a)
Signed-off-by: Thomas Guillem <[email protected]>

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

 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 c97d283bab..cfd7e818f1 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -1044,7 +1044,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