summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-13 11:38:36 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-13 11:38:36 +0000
commitf34618039153d746d9f4823856b4a36ae3b34583 (patch)
treeff7bdde6193317878bae5cbac60fa21e3bb559ee /mplayer.c
parent59d3c04b58783a9e12c47fdad9daf32ad46fa71e (diff)
downloadmpv-f34618039153d746d9f4823856b4a36ae3b34583.tar.bz2
mpv-f34618039153d746d9f4823856b4a36ae3b34583.tar.xz
Move the check for valid sh_video into the init_vo_spudec, this fixes a crash
when command.c calls this function without having to duplicate the check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30548 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index f76548def2..fa88002344 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1138,6 +1138,11 @@ void init_vo_spudec(void) {
spudec_free(vo_spudec);
initialized_flags &= ~INITIALIZED_SPUDEC;
vo_spudec = NULL;
+
+ // we currently can't work without video stream
+ if (!mpctx->sh_video)
+ return;
+
if (spudec_ifo) {
unsigned int palette[16], width, height;
current_module="spudec_init_vobsub";
@@ -3514,7 +3519,7 @@ if(!mpctx->sh_video && !mpctx->sh_audio){
demux_info_print(mpctx->demuxer);
//================== Read SUBTITLES (DVD & TEXT) ==========================
-if(vo_spudec==NULL && mpctx->sh_video &&
+if(vo_spudec==NULL &&
(mpctx->stream->type==STREAMTYPE_DVD || mpctx->stream->type == STREAMTYPE_DVDNAV)){
init_vo_spudec();
}