[vlc-commits] mkv: abort if read fails during seek
Filip Roséen
git at videolan.org
Tue Jun 14 17:04:28 CEST 2016
vlc | branch: master | Filip Roséen <filip at videolabs.io> | Tue Jun 14 16:58:25 2016 +0200| [1d569978736520a154153d32364bda4a3d878832] | committer: Thomas Guillem
mkv: abort if read fails during seek
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1d569978736520a154153d32364bda4a3d878832
---
modules/demux/mkv/matroska_segment_seeker.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mkv/matroska_segment_seeker.cpp b/modules/demux/mkv/matroska_segment_seeker.cpp
index cd9b7ae..de18242 100644
--- a/modules/demux/mkv/matroska_segment_seeker.cpp
+++ b/modules/demux/mkv/matroska_segment_seeker.cpp
@@ -427,7 +427,12 @@ SegmentSeeker::mkv_jump_to( matroska_segment_c& ms, fptr_t fpos )
while( ms.cluster == NULL || ms.cluster->GetEndPosition() < fpos )
{
- ms.cluster = static_cast<KaxCluster*>( ms.ep->Get() );
+ if( !( ms.cluster = static_cast<KaxCluster*>( ms.ep->Get() ) ) )
+ {
+ msg_Err( &ms.sys.demuxer, "unable to read KaxCluster during seek, giving up" );
+ return;
+ }
+
i_cluster_pos = ms.cluster->GetElementPosition();
add_cluster_position( i_cluster_pos );
More information about the vlc-commits
mailing list