summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY3
-rw-r--r--TODO6
-rw-r--r--dxr3.c16
-rw-r--r--dxr3outputthread.c16
-rw-r--r--dxr3outputthread.h4
-rw-r--r--dxr3singleton.h6
-rw-r--r--dxr3syncbuffer.c2
7 files changed, 37 insertions, 16 deletions
diff --git a/HISTORY b/HISTORY
index 26c5040..0bf87f0 100644
--- a/HISTORY
+++ b/HISTORY
@@ -288,4 +288,5 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
(Luca Olivetti, Kimmo Vuorinen)
- rework OSD color management, fixes color "bleeding" (Luca Olivetti)
- sync SPU decoder with VDR 1.3.23 (Ville Skyttä)
-- register only needed ffmpeg codec(s) (Marco Schluessler)
+- register only needed ffmpeg codec(s) (Marco Schlüßler)
+- fix crash at exit (Marco Schlüßler)
diff --git a/TODO b/TODO
index 720d590..ae4b08c 100644
--- a/TODO
+++ b/TODO
@@ -8,12 +8,6 @@ Known problems, bugs, and workarounds for this driver:
* VCD plugin does not work.
Workaround: use the MPlayer plugin to play VCDs.
-* VDR crashes at exit.
- Workaround: none known. Unless you want to try to debug it (which you're
- most welcome to do, obviously!), you probably don't want core dumps all
- over your disk. Disable them with eg. "ulimit -c 0" in the environment
- you run VDR in.
-
* When cutting recordings from some channels, the still picture is stuck
and won't move when you press 4 or 6 to fine tune the cutmarks.
Workaround: see vdr-iframe.patch in the patches/ directory.
diff --git a/dxr3.c b/dxr3.c
index 3a6bf49..16dbd6c 100644
--- a/dxr3.c
+++ b/dxr3.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
-* $Id: dxr3.c,v 1.1.2.8 2005/04/18 21:17:42 scop Exp $
+* $Id: dxr3.c,v 1.1.2.9 2005/04/19 06:11:43 scop Exp $
*/
@@ -31,7 +31,8 @@ eOSState cDxr3OsdItem::ProcessKey(eKeys Key)
{
case DXR3_RESET_HARDWARE:
cDxr3Interface::Instance().ResetHardware();
- cDxr3Device::Instance().Reset();
+ if (cDxr3Device::InstanceP())
+ cDxr3Device::InstanceP()->Reset();
break;
case DXR3_FORCE_LETTER_BOX:
@@ -42,20 +43,23 @@ eOSState cDxr3OsdItem::ProcessKey(eKeys Key)
cLog::Instance() << "Changing audio to analog\n";
cDxr3ConfigData::Instance().SetUseDigitalOut(0);
cDxr3ConfigData::Instance().SetAc3OutPut(0);
- cDxr3Device::Instance().Reset();
+ if (cDxr3Device::InstanceP())
+ cDxr3Device::InstanceP()->Reset();
break;
case DXR3_DIGITAL_OUT:
cLog::Instance() << "Changing audio to digital\n";
cDxr3ConfigData::Instance().SetUseDigitalOut(1);
cDxr3ConfigData::Instance().SetAc3OutPut(0);
- cDxr3Device::Instance().Reset();
+ if (cDxr3Device::InstanceP())
+ cDxr3Device::InstanceP()->Reset();
break;
case DXR3_AC3_OUT:
cLog::Instance() << "Changing audio to ac3\n";
cDxr3ConfigData::Instance().SetAc3OutPut(!cDxr3ConfigData::Instance().GetAc3OutPut());
- cDxr3Device::Instance().Reset();
+ if (cDxr3Device::InstanceP())
+ cDxr3Device::InstanceP()->Reset();
break;
}
}
@@ -154,7 +158,7 @@ bool cPluginDxr3::Initialize()
RegisterI18n(Phrases);
new cDxr3CPU();
- cDxr3Device::Instance();
+ cDxr3Device::InstanceP();
return true;
}
diff --git a/dxr3outputthread.c b/dxr3outputthread.c
index 42381fe..ba7e7bb 100644
--- a/dxr3outputthread.c
+++ b/dxr3outputthread.c
@@ -69,6 +69,14 @@ cDxr3OutputThread(dxr3Device, buffer)
#endif
}
+//! destructor
+cDxr3AudioOutThread::~cDxr3AudioOutThread()
+{
+ m_buffer.Stop();
+ SetStopSignal();
+ Cancel(3);
+}
+
// ==================================
//! thread action
void cDxr3AudioOutThread::Action()
@@ -154,6 +162,14 @@ cDxr3OutputThread(dxr3Device, buffer)
#endif
}
+//! destructor
+cDxr3VideoOutThread::~cDxr3VideoOutThread()
+{
+ m_buffer.Stop();
+ SetStopSignal();
+ Cancel(3);
+}
+
// ==================================
//! thread action
void cDxr3VideoOutThread::Action()
diff --git a/dxr3outputthread.h b/dxr3outputthread.h
index e50393b..38630ae 100644
--- a/dxr3outputthread.h
+++ b/dxr3outputthread.h
@@ -56,7 +56,7 @@ class cDxr3AudioOutThread : public cDxr3OutputThread
{
public:
cDxr3AudioOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer);
- virtual ~cDxr3AudioOutThread() {}
+ virtual ~cDxr3AudioOutThread();
protected:
void Action();
@@ -71,7 +71,7 @@ class cDxr3VideoOutThread : public cDxr3OutputThread
{
public:
cDxr3VideoOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer);
- virtual ~cDxr3VideoOutThread() {}
+ virtual ~cDxr3VideoOutThread();
protected:
void Action();
diff --git a/dxr3singleton.h b/dxr3singleton.h
index fbc8031..8be1216 100644
--- a/dxr3singleton.h
+++ b/dxr3singleton.h
@@ -41,6 +41,12 @@ class Singleton
static T m_Instance;
return m_Instance;
}
+
+ static T* InstanceP()
+ {
+ static T* m_InstanceP = new T;
+ return m_InstanceP;
+ }
};
#endif /*_DXR3_SINGLETON_H_*/
diff --git a/dxr3syncbuffer.c b/dxr3syncbuffer.c
index fd2a967..d21f40c 100644
--- a/dxr3syncbuffer.c
+++ b/dxr3syncbuffer.c
@@ -318,7 +318,7 @@ cFixedLengthFrame* cDxr3SyncBuffer::Get(void)
if (!m_bStopped)
{
- while (!Available() || !m_bStartReceiver)
+ while ((!Available() || !m_bStartReceiver) && !m_bStopped)
{
m_bGetBlock = true;
ReceiverStopped();