From 0fbad6b69ac01e77062329298794772e8d4b22a4 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 5 Jun 2012 16:34:47 +0400 Subject: [PATCH] eitd/dmx.cpp: revert dmx Open/Close to use Stop - prevent crash, if one thread use change() while other try to read (time thread) --- src/eitd/dmx.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eitd/dmx.cpp b/src/eitd/dmx.cpp index 9e95cbba5..6097b0691 100644 --- a/src/eitd/dmx.cpp +++ b/src/eitd/dmx.cpp @@ -42,7 +42,7 @@ #include "dmx.h" #include "debug.h" -#define DEBUG_MUTEX 1 +//#define DEBUG_MUTEX 1 //#define DEBUG_DEMUX 1 // debug start/close/change //#define DEBUG_CACHED_SECTIONS 1 //#define DEBUG_COMPLETE_SECTIONS 1 @@ -120,7 +120,7 @@ void DMX::closefd(void) #endif if (isOpen()) { - dmx->Close(); + dmx->Stop(); fd = -1; } } @@ -484,8 +484,8 @@ int DMX::immediate_start(void) if(dmx == NULL) { dmx = new cDemux(dmx_num); + dmx->Open(DMX_PSI_CHANNEL, NULL, dmxBufferSizeInKB*1024UL); } - dmx->Open(DMX_PSI_CHANNEL, NULL, dmxBufferSizeInKB*1024UL); fd = 1; /* setfilter() only if this is no dummy filter... */