summaryrefslogtreecommitdiff
path: root/src/decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder.cc')
-rw-r--r--src/decoder.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/decoder.cc b/src/decoder.cc
index 9798b03..cd5806f 100644
--- a/src/decoder.cc
+++ b/src/decoder.cc
@@ -69,11 +69,13 @@ void Decoder::decode()
// Read a dvframe
ptr = dv_stream.readFrame();
if(!ptr) return; // No frame read. (Due to firewire error)
- Frame *frame = new Frame(ptr, DVPACKAGE_SIZE);
+ Frame *eframe = new Frame(ptr, DVPACKAGE_SIZE);
+ Frame *pframe = new Frame(ptr, DVPACKAGE_SIZE);
+ free(ptr);
pthread_mutex_lock(mutex);
- encode_queue->push(frame);
- player_queue->push(frame);
+ encode_queue->push(eframe);
+ player_queue->push(pframe);
pthread_mutex_unlock(mutex);
sem_post(encode_sem);
@@ -84,9 +86,6 @@ void Decoder::decode()
user_event.user.data1 = NULL;
user_event.user.data2 = NULL;
SDL_PushEvent(&user_event);
-
- // Free framedata.
- // free(ptr);
}
// Kick the others so they wake up with empty queues