diff command.c @ 23766:f0c2f9de85ba

Make sure that sub->id is -2 and sub->sh is NULL if subtitle doesn't exist. Probably sanest way to avoid crash in e.g. mov demuxer without having to check both all the time.
author reimar
date Sun, 15 Jul 2007 17:56:06 +0000
parents 795631068b92
children 7065615ef25c
line wrap: on
line diff
--- a/command.c	Sun Jul 15 14:47:19 2007 +0000
+++ b/command.c	Sun Jul 15 17:56:06 2007 +0000
@@ -1342,6 +1342,9 @@
 		else if (ass_enabled && sh->type == 'a')
 		    ass_track = sh->ass_track;
 #endif
+            } else {
+              d_sub->id = -2;
+              d_sub->sh = NULL;
 	    }
 	}
     }