summaryrefslogtreecommitdiff
path: root/src/mov_encoder_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mov_encoder_thread.cc')
-rw-r--r--src/mov_encoder_thread.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mov_encoder_thread.cc b/src/mov_encoder_thread.cc
index 6c54191..35f62a6 100644
--- a/src/mov_encoder_thread.cc
+++ b/src/mov_encoder_thread.cc
@@ -35,7 +35,6 @@ MovEncoderThread::MovEncoderThread(const char *clientip, const char *cpr, Info *
info->info("MovEncoderThread");
// Queue
- // inputqueue = new ThreadSafeQueueFIFO<FrameVector*>();
inputqueue = new ThreadSafeQueueFIFO();
// Initialize read semaphore
@@ -94,31 +93,26 @@ MovEncoderThread::~MovEncoderThread()
info->info("~MovEncoderThread");
// First we destroy the movie encoders
- // for(int cnt = 0; cnt < threads; cnt++) sem_post(&in_sem); // Kick them
for(int cnt = 0; cnt < threads; cnt++) {
encs[cnt]->wait_stop(); // Wait for it to stop
delete encs[cnt]; // Delete it
}
-
info->info("Deleted the movie encoders");
+
// Then we destroy the audio encoder
audioenc->wait_stop(); // Wait for it to stop.
delete audioenc; // delete the audio encoder
-
info->info("Deleted the audio encoder");
- // Finally we destroy the writer.
- writer->running = false;
- // FIXME: Post writer
+ // Finally we destroy the writer.
writer->wait_stop(); // Wait for it to stop.
delete writer; // delete the writer (end thereby close the file)
-
info->info("Deleted the writer");
- // Destroy the semaphores.
- // sem_destroy(&in_sem);
+
+ // Destroy the semaphore.
sem_destroy(&read_sem);
info->info("~MovEncoderThread::done");