Commit 4ba01f28 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mkv: fix seek segfault with invalid chapters

parent a4c33da2
...@@ -445,6 +445,11 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, virtual_ch ...@@ -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!"); msg_Warn( p_demux, "cannot seek without duration!");
return; return;
} }
if( !p_segment )
{
msg_Warn( p_demux, "cannot seek without valid segment position");
return;
}
/* seek without index or without date */ /* seek without index or without date */
if( f_percent >= 0 && (var_InheritBool( p_demux, "mkv-seek-percent" ) || !p_segment->b_cues || i_date < 0 )) if( f_percent >= 0 && (var_InheritBool( p_demux, "mkv-seek-percent" ) || !p_segment->b_cues || i_date < 0 ))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment