summaryrefslogtreecommitdiff
path: root/src/encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoder.cc')
-rw-r--r--src/encoder.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index 878c97d..52a7f93 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -73,12 +73,9 @@ void Encoder::encode()
while(*running) {
sem_wait(sem);
- pthread_mutex_lock(mutex);
frame = queue->pop();
- // queue->plength();
- // pthread_mutex_unlock(mutex);
- while(frame) {
+ if(frame) {
if(record ||
(freeze_request != freeze_value) ||
(shoot_request != shoot_value)) {
@@ -97,12 +94,7 @@ void Encoder::encode()
n->sendPackage(&h, frame->data, frame->size);
}
if(frame) delete frame;
-
- // pthread_mutex_lock(mutex);
- frame = queue->pop();
- // queue->plength();
}
- pthread_mutex_unlock(mutex);
}
}