From 5830d4adc3ee9a3a0f1e098e77b122b2045af211 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 21 Feb 2015 22:14:47 +0100 Subject: [PATCH] spark: remove videodecoder hack from dmx destructor --- libspark/dmx.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/libspark/dmx.cpp b/libspark/dmx.cpp index 47b4811..d260873 100644 --- a/libspark/dmx.cpp +++ b/libspark/dmx.cpp @@ -73,7 +73,7 @@ #include "lt_debug.h" #include "video_priv.h" -/* Ugh... see comment in destructor for details... */ +/* needed for getSTC... */ extern cVideo *videoDecoder; #define lt_debug(args...) _lt_debug(TRIPLE_DEBUG_DEMUX, this, args) @@ -148,19 +148,8 @@ cDemux::~cDemux() { lt_debug("%s #%d fd: %d\n", __FUNCTION__, num, fd); Close(); + /* wait until Read() has released the mutex */ (*P->mutex).lock(); - /* in zapit.cpp, videoDemux is deleted after videoDecoder - * in the video watchdog, we access videoDecoder - * the thread still runs after videoDecoder has been deleted - * => set videoDecoder to NULL here to make the check in the - * watchdog thread pick this up. - * This is ugly, but it saves me from changing neutrino - * - * if the delete order in neutrino will ever be changed, this - * will blow up badly :-( - */ - if (dmx_type == DMX_VIDEO_CHANNEL) - videoDecoder = NULL; (*P->mutex).unlock(); free(P->mutex); free(pdata);