Avoid a possible crash if num_cluster_pos is 0.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29737 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-09-30 07:45:10 +00:00
parent eb5571e57e
commit 62a3efebf2
1 changed files with 1 additions and 1 deletions

View File

@ -2961,7 +2961,7 @@ demux_mkv_seek (demuxer_t *demuxer, float rel_seek_secs, float audio_delay, int
target_filepos = (uint64_t) (target_timecode * mkv_d->last_filepos
/ (mkv_d->last_pts * 1000.0));
max_pos = mkv_d->cluster_positions[mkv_d->num_cluster_pos-1];
max_pos = mkv_d->num_cluster_pos ? mkv_d->cluster_positions[mkv_d->num_cluster_pos-1] : 0;
if (target_filepos > max_pos)
{
if ((off_t) max_pos > stream_tell (s))