summaryrefslogtreecommitdiff
path: root/src/decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder.cc')
-rw-r--r--src/decoder.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/decoder.cc b/src/decoder.cc
index 7b4720e..9798b03 100644
--- a/src/decoder.cc
+++ b/src/decoder.cc
@@ -59,7 +59,7 @@ Decoder::~Decoder()
void Decoder::decode()
{
- dv1394 dv_stream = dv1394(); // Use default port and channel.
+ dv1394 dv_stream = dv1394(errobj); // Use default port and channel.
while(*running) {
uint8_t *ptr;
@@ -67,7 +67,9 @@ void Decoder::decode()
SDL_Event user_event;
// Read a dvframe
- Frame *frame = new Frame(dv_stream.readFrame(), DVPACKAGE_SIZE);
+ ptr = dv_stream.readFrame();
+ if(!ptr) return; // No frame read. (Due to firewire error)
+ Frame *frame = new Frame(ptr, DVPACKAGE_SIZE);
pthread_mutex_lock(mutex);
encode_queue->push(frame);