From 8e52138ba8a6fe9b92192512ba510451a2655384 Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 18 Sep 2005 14:34:10 +0000 Subject: *** empty log message *** --- src/mov_encoder_thread.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/mov_encoder_thread.cc') 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); -- cgit v1.2.3