[vlc-commits] demux: mkv: fix seek segfault with invalid chapters
Francois Cartegnie
git at videolan.org
Fri Mar 14 19:35:38 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Mar 14 19:34:19 2014 +0100| [4ba01f2831193b2a59513c897b159c14c0a9f086] | committer: Francois Cartegnie
demux: mkv: fix seek segfault with invalid chapters
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ba01f2831193b2a59513c897b159c14c0a9f086
---
modules/demux/mkv/mkv.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 4b49f4c..ec4ebfa 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -445,6 +445,11 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, virtual_ch
msg_Warn( p_demux, "cannot seek without duration!");
return;
}
+ if( !p_segment )
+ {
+ msg_Warn( p_demux, "cannot seek without valid segment position");
+ return;
+ }
/* seek without index or without date */
if( f_percent >= 0 && (var_InheritBool( p_demux, "mkv-seek-percent" ) || !p_segment->b_cues || i_date < 0 ))
More information about the vlc-commits
mailing list