[vlc-commits] demux:mkv: parse the first Cluster when we look for the duration
Steve Lhomme
git at videolan.org
Thu Feb 15 14:57:01 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | 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
More information about the vlc-commits
mailing list