[Mplayer-cvslog] CVS: main vobsub.c,1.2,1.3

Kim Minh Kaplan CVS kmkaplan at mplayer.dev.hu
Sat Jan 12 19:34:52 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv28342

Modified Files:
	vobsub.c 
Log Message:
Check for NULL vob->spudec before using.

Index: vobsub.c
===================================================================
RCS file: /cvsroot/mplayer/main/vobsub.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vobsub.c	10 Jan 2002 20:12:12 -0000	1.2
+++ vobsub.c	12 Jan 2002 18:34:50 -0000	1.3
@@ -754,18 +754,19 @@
 {
     vobsub_t *vob = (vobsub_t *)vobhandle;
     unsigned int pts100 = 100 * pts;
-    if (vob->spudec)
+    if (vob->spudec) {
 	spudec_heartbeat(vob->spudec, pts100);
-    if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {
-	packet_queue_t *queue = vob->spu_streams + vobsub_id;
-	while (queue->current_index < queue->packets_size) {
-	    packet_t *pkt = queue->packets + queue->current_index;
-	    if (pkt->pts100 <= pts100) {
-		spudec_assemble(vob->spudec, pkt->data, pkt->size, pkt->pts100);
-		++queue->current_index;
+	if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {
+	    packet_queue_t *queue = vob->spu_streams + vobsub_id;
+	    while (queue->current_index < queue->packets_size) {
+		packet_t *pkt = queue->packets + queue->current_index;
+		if (pkt->pts100 <= pts100) {
+		    spudec_assemble(vob->spudec, pkt->data, pkt->size, pkt->pts100);
+		    ++queue->current_index;
+		}
+		else
+		    break;
 	    }
-	    else
-		break;
 	}
     }
 }




More information about the MPlayer-cvslog mailing list