# HG changeset patch # User reimar # Date 1184522166 0 # Node ID f0c2f9de85bace0bbe080a78c011924aa5b34513 # Parent 9c7a9b9d793b14325c62d90a8ba509ff489b56a6 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. diff -r 9c7a9b9d793b -r f0c2f9de85ba command.c --- 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; } } }