summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluran <luran@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-01-01 11:01:09 +0000
committerluran <luran@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-01-01 11:01:09 +0000
commite3f069bf7a381b957aee697c9354bcbb9d7c8d2a (patch)
tree5c5f1d52834e51d8cb751875657cf1ab091300e8
parent9fc389a29a885da9382cf62074441811218e46e6 (diff)
downloadmpv-e3f069bf7a381b957aee697c9354bcbb9d7c8d2a.tar.bz2
mpv-e3f069bf7a381b957aee697c9354bcbb9d7c8d2a.tar.xz
fix the crash when seek with 'unknown' subtitles, hopefully...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11710 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--vobsub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vobsub.c b/vobsub.c
index a85d230951..3135952265 100644
--- a/vobsub.c
+++ b/vobsub.c
@@ -1274,6 +1274,9 @@ void vobsub_seek(void * vobhandle, float pts)
int seek_pts100 = (int)pts * 90000;
if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {
+ /* do not seek if we don't know the id */
+ if (vobsub_get_id(vob, vobsub_id) == NULL)
+ return;
queue = vob->spu_streams + vobsub_id;
queue->current_index = 0;
while ((queue->packets + queue->current_index)->pts100 < seek_pts100)