[MPlayer-cvslog] r22333 - trunk/libmpdemux/demux_mov.c

reimar subversion at mplayerhq.hu
Sat Feb 24 11:19:41 CET 2007


Author: reimar
Date: Sat Feb 24 11:19:41 2007
New Revision: 22333

Modified:
   trunk/libmpdemux/demux_mov.c

Log:
10l, avoid crash on invalid subtitle id


Modified: trunk/libmpdemux/demux_mov.c
==============================================================================
--- trunk/libmpdemux/demux_mov.c	(original)
+++ trunk/libmpdemux/demux_mov.c	Sat Feb 24 11:19:41 2007
@@ -2155,9 +2155,11 @@
     
     ++trak->pos;
 
-    if (demuxer->sub->id >= 0) {
-      int samplenr = 0;
+    trak = NULL;
+    if (demuxer->sub->id >= 0 && demuxer->sub->id < priv->track_db)
       trak = priv->tracks[demuxer->sub->id];
+    if (trak) {
+      int samplenr = 0;
       while (samplenr < trak->samples_size) {
         double subpts = (double)trak->samples[samplenr].pts / (double)trak->timescale;
         if (subpts >= pts) break;



More information about the MPlayer-cvslog mailing list