summaryrefslogtreecommitdiff
path: root/src/encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoder.cc')
-rw-r--r--src/encoder.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index ca8fb4f..a762c99 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -30,7 +30,7 @@ Encoder::Encoder(Error* err,
const char *gip,
const int gport,
sem_t *gsem,
- Queue<DVFrame> *gqueue,
+ Queue<Frame> *gqueue,
pthread_mutex_t *gmutex,
volatile int *grunning)
{
@@ -68,7 +68,7 @@ Encoder::~Encoder()
void Encoder::encode()
{
- DVFrame *f;
+ Frame *f;
while(*running) {
sem_wait(sem);
@@ -92,10 +92,11 @@ void Encoder::encode()
if(freeze_request != freeze_value) freeze_value = freeze_request;
if(shoot_request != shoot_value) shoot_value = shoot_request;
- n->sendPackage(&h, f->frame, sizeof(f->frame));
+ n->sendPackage(&h, f->data, f->size);
+
+ free(f->data);
+ delete f;
}
-
- if(f) delete f;
}
pthread_exit(NULL);
}