summaryrefslogtreecommitdiff
path: root/src/decoder.cc
diff options
context:
space:
mode:
authordeva <deva>2005-04-26 07:53:37 +0000
committerdeva <deva>2005-04-26 07:53:37 +0000
commit805229c3b5a9b5078a273d175140b42445fd501a (patch)
treec272ac633cbc6914c585c9d196b4406d4cca2949 /src/decoder.cc
parent3ac7bf67ffca34e84053b2721aba922baf30d660 (diff)
Made variable argument pushError method
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);