diff --git a/src/eitd/dmx.cpp b/src/eitd/dmx.cpp index ee75a6e05..3850c3983 100644 --- a/src/eitd/dmx.cpp +++ b/src/eitd/dmx.cpp @@ -117,11 +117,13 @@ void DMX::close(void) void DMX::closefd(void) { #ifdef DEBUG_DEMUX - xprintf(" %s: DMX::closefd, isOpen %d\n", name.c_str(), isOpen()); + xcprintf(" %s: DMX::closefd, isOpen %d demux #%d", name.c_str(), isOpen(), dmx_num); #endif if (isOpen()) { - dmx->Stop(); + //dmx->Stop(); + delete dmx; + dmx = NULL; fd = -1; } } @@ -484,6 +486,9 @@ int DMX::immediate_start(void) } if(dmx == NULL) { +#ifdef DEBUG_DEMUX + xcprintf(" %s: open demux #%d", name.c_str(), dmx_num); +#endif dmx = new cDemux(dmx_num); dmx->Open(DMX_PSI_CHANNEL, NULL, dmxBufferSizeInKB*1024UL); } diff --git a/src/eitd/dmx.h b/src/eitd/dmx.h index f05a09f77..38d30a31a 100644 --- a/src/eitd/dmx.h +++ b/src/eitd/dmx.h @@ -126,6 +126,7 @@ public: unsigned char get_eit_version(void) { return eit_version; } // was useful for debugging... t_channel_id get_current_service(void) { return current_service; } + void setDemux(int dnum) { dmx_num = dnum; } }; #endif /* __sectionsd__dmx_h__ */