mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Fixed a race condition in the SPU decoder
This commit is contained in:
4
dvbspu.c
4
dvbspu.c
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* parts of this file are derived from the OMS program.
|
||||
*
|
||||
* $Id: dvbspu.c 1.16 2005/11/04 14:19:07 kls Exp $
|
||||
* $Id: dvbspu.c 1.17 2005/11/05 12:08:15 kls Exp $
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@@ -338,6 +338,7 @@ sDvbSpuRect cDvbSpuDecoder::CalcAreaSize(sDvbSpuRect fgsize, cBitmap *fgbmp, sDv
|
||||
|
||||
void cDvbSpuDecoder::Draw(void)
|
||||
{
|
||||
cMutexLock MutexLock(&mutex);
|
||||
if (!spubmp) {
|
||||
Hide();
|
||||
return;
|
||||
@@ -390,6 +391,7 @@ void cDvbSpuDecoder::Draw(void)
|
||||
|
||||
void cDvbSpuDecoder::Hide(void)
|
||||
{
|
||||
cMutexLock MutexLock(&mutex);
|
||||
delete osd;
|
||||
osd = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user