summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-15 17:56:06 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-15 17:56:06 +0000
commitdfae0dfa58f40d291354c67eedc4ff7cc15dcc1e (patch)
treee012a5e7a9bc6703e602cdd5ccf043bf4ea6fbe3 /command.c
parenta7b8d368db3c39fe4912c6d4b230f01cbbe85fb0 (diff)
downloadmpv-dfae0dfa58f40d291354c67eedc4ff7cc15dcc1e.tar.bz2
mpv-dfae0dfa58f40d291354c67eedc4ff7cc15dcc1e.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23786 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'command.c')
-rw-r--r--command.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/command.c b/command.c
index b1483f787b..ee12175750 100644
--- a/command.c
+++ b/command.c
@@ -1342,6 +1342,9 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg,
else if (ass_enabled && sh->type == 'a')
ass_track = sh->ass_track;
#endif
+ } else {
+ d_sub->id = -2;
+ d_sub->sh = NULL;
}
}
}