summaryrefslogtreecommitdiff
path: root/src/mov_encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mov_encoder.cc')
-rw-r--r--src/mov_encoder.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc
index 9212e5a..09e6fa3 100644
--- a/src/mov_encoder.cc
+++ b/src/mov_encoder.cc
@@ -97,7 +97,7 @@ void MovEncoder::thread_main()
LibFAMEWrapper fame(info);
// Process until running == false and the queue is empty
- while(*running || ((*running == false) && (insize > 0))) {
+ while(*running) {
sem_wait(input_sem);
// Lock inout mutex
@@ -113,18 +113,16 @@ void MovEncoder::thread_main()
in_frame = item->at(cnt);
// Check for end of stream
- if(in_frame == endOfFrameStream) {
+ if(in_frame->endOfFrameStream == true) {
info->info("endOfFrameStream in MovEncoder");
-
- out_v_frame = in_frame;
-
// Stop running
*running = false;
- } else {
- // Encode video
- out_v_frame = fame.encode(in_frame);
- out_v_frame->number = in_frame->number;
}
+ // Encode video
+ out_v_frame = fame.encode(in_frame);
+ out_v_frame->number = in_frame->number;
+ out_v_frame->endOfFrameStream = in_frame->endOfFrameStream;
+
// Create audio frame
out_a_frame = in_frame;