From 879a1f1ba53b76dfd2454faf43abca5238d097de Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 28 Sep 2009 16:49:17 +0000 Subject: [PATCH] Patch for ttx segfault --- vvideolivetv.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vvideolivetv.cc b/vvideolivetv.cc index 40838fe..8d50bf2 100644 --- a/vvideolivetv.cc +++ b/vvideolivetv.cc @@ -397,7 +397,7 @@ int VVideoLiveTV::handleCommand(int command) } case Remote::YELLOW: { - doTeletext(); //TODO: Add a selector for subtitles or teletext + if (streamType ==VDR::VIDEO) doTeletext(); //TODO: Add a selector for subtitles or teletext return 2; } case Remote::GUIDE: @@ -577,6 +577,7 @@ void VVideoLiveTV::doKey(int command) void VVideoLiveTV::doTeletext(bool subtitlemode) { + if (streamType !=VDR::VIDEO) return; bool exists=true; // Cancel keying @@ -642,7 +643,7 @@ void VVideoLiveTV::doAudioSelector() // Draw the selector vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLiveTV*)player)->getCurrentAudioChannel(), - subtitleType,subtitleChannel,player->getTeletxtSubtitlePages()); + subtitleType,subtitleChannel,NULL); Colour osdBack = Colour(0, 0, 0, 128); vas->setBackgroundColour(osdBack); vas->setPosition(0, osd.getScreenY() - vas->getHeight()); @@ -862,12 +863,13 @@ void VVideoLiveTV::timercall(int ref) bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) { UINT newChannel = 0; + if (streamType ==VDR::VIDEO) { VTeletextView *vtxt=((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView(); - if (vtxt ) { - BoxStack::getInstance()->remove(vtxt); - - } + if (vtxt ) { + BoxStack::getInstance()->remove(vtxt); + } + } if (changeType == INDEX) { newChannel = newData; @@ -987,6 +989,7 @@ void VVideoLiveTV::processMessage(Message* m) } else if (m->message == Message::SUBTITLE_CHANGE_CHANNEL) { + if (streamType !=VDR::VIDEO) return; Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received change subtitle channel to %i", m->parameter); int type=((m->parameter & 0xFF0000)>>16); switch (type) { -- 2.39.5