diff --git a/daemon/src/video/video_send_thread.cpp b/daemon/src/video/video_send_thread.cpp index 0d541bbc5799a2c22b3feaad00671a75b9d4c2b6..7be1fdc972206f97a2dad19e96cf0df991dd3045 100644 --- a/daemon/src/video/video_send_thread.cpp +++ b/daemon/src/video/video_send_thread.cpp @@ -65,13 +65,6 @@ void VideoSendThread::print_sdp() sdp_ += line + "\n"; } DEBUG("sending\n%s", sdp_.c_str()); - sdpReady_.signal(); -} - -// NOT called from this (the run() ) thread -void VideoSendThread::waitForSDP() -{ - sdpReady_.wait(); } void VideoSendThread::forcePresetX264() @@ -328,7 +321,7 @@ int VideoSendThread::interruptCb(void *ctx) } VideoSendThread::VideoSendThread(const std::map<string, string> &args) : - sdpReady_(), args_(args), scaledPictureBuf_(0), outbuf_(0), + args_(args), scaledPictureBuf_(0), outbuf_(0), inputDecoderCtx_(0), rawFrame_(0), scaledPicture_(0), streamIndex_(-1), outbufSize_(0), encoderCtx_(0), stream_(0), inputCtx_(0), outputCtx_(0), imgConvertCtx_(0), sdp_(), interruptCb_(), @@ -431,9 +424,6 @@ VideoSendThread::~VideoSendThread() // FIXME sending_ = false; ost::Thread::terminate(); - // make sure no one is waiting for the SDP which will never come if we've - // error'd out - sdpReady_.signal(); sws_freeContext(imgConvertCtx_); imgConvertCtx_ = 0; diff --git a/daemon/src/video/video_send_thread.h b/daemon/src/video/video_send_thread.h index c7d63efeb8571974ab9422b23240024a840da3b0..3aa0d3b6a116f8b5f3f40c8281ec417bd42459a8 100644 --- a/daemon/src/video/video_send_thread.h +++ b/daemon/src/video/video_send_thread.h @@ -58,7 +58,6 @@ class VideoSendThread : public ost::Thread { void prepareEncoderContext(AVCodec *encoder); void createScalingContext(); static int interruptCb(void *ctx); - ost::Event sdpReady_; std::map<std::string, std::string> args_; /*-------------------------------------------------------------*/ @@ -87,8 +86,6 @@ class VideoSendThread : public ost::Thread { public: explicit VideoSendThread(const std::map<std::string, std::string> &args); virtual ~VideoSendThread(); - // called from main thread - void waitForSDP(); virtual void run(); std::string getSDP() const { return sdp_; } void forceKeyFrame();