summaryrefslogtreecommitdiff
path: root/src/mov_encoder_thread.cc
diff options
context:
space:
mode:
authordeva <deva>2005-09-18 14:34:10 +0000
committerdeva <deva>2005-09-18 14:34:10 +0000
commit8e52138ba8a6fe9b92192512ba510451a2655384 (patch)
tree401a2e63ca122e898e91fb8dedb71fc39755f850 /src/mov_encoder_thread.cc
parenta37c83d8c536ef6dd53b130e92022b04e8559f5b (diff)
*** empty log message ***
Diffstat (limited to 'src/mov_encoder_thread.cc')
-rw-r--r--src/mov_encoder_thread.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mov_encoder_thread.cc b/src/mov_encoder_thread.cc
index 4562ec9..1e8263b 100644
--- a/src/mov_encoder_thread.cc
+++ b/src/mov_encoder_thread.cc
@@ -98,12 +98,6 @@ MovEncoderThread::~MovEncoderThread()
{
info->info("~MovEncoderThread");
- // Push end of stream frame to the queue.
- num_frames_in_block = block->size() + 1; // Make the next frame fill out the block.
- encode(endOfFrameStream);
-
- info->info("Posted endOfFrameStream");
-
// 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++) {
@@ -121,6 +115,7 @@ MovEncoderThread::~MovEncoderThread()
info->info("Deleted the audio encoder");
// Finally we destroy the writer.
+ writer->running = false;
sem_post(&video_out_sem); // Kick it to make it stop.
sem_post(&audio_out_sem); // Kick it to make it stop.
writer->wait_stop(); // Wait for it to stop.
@@ -201,7 +196,7 @@ void MovEncoderThread::encode(Frame* frame)
block->push_back(frame);
// Switch frame
- if(block->size() == num_frames_in_block) {
+ if(block->size() == num_frames_in_block || frame->endOfFrameStream == true) {
// Wait until a free encoder.
sem_wait(&read_sem);