changeset 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 9c7a9b9d793b
children e9d6eda05f00
files command.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;
 	    }
 	}
     }