changeset 11709:4afcdb7b8aab

fix the crash when seek with 'unknown' subtitles, hopefully...
author luran
date Thu, 01 Jan 2004 11:01:09 +0000
parents ce988d24582c
children d37d4bc38f26
files vobsub.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vobsub.c	Wed Dec 31 21:55:05 2003 +0000
+++ b/vobsub.c	Thu Jan 01 11:01:09 2004 +0000
@@ -1274,6 +1274,9 @@
   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)