summaryrefslogtreecommitdiff
path: root/client/dvfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/dvfile.cc')
-rw-r--r--client/dvfile.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/dvfile.cc b/client/dvfile.cc
index 676d6b1..601c21d 100644
--- a/client/dvfile.cc
+++ b/client/dvfile.cc
@@ -42,19 +42,21 @@ dvfile::~dvfile()
fclose(fp);
}
-unsigned char *dvfile::readFrame()
+Frame *dvfile::readFrame()
{
- unsigned char *frame = new unsigned char[DVPACKAGE_SIZE];
+ unsigned char *ptr = new unsigned char[DVPACKAGE_SIZE];
sleep_1_frame();
if(fp) {
- while(fread(frame, DVPACKAGE_SIZE, 1, fp) == 0) {
+ while(fread(ptr, DVPACKAGE_SIZE, 1, fp) == 0) {
fseek(fp, 0L, SEEK_SET);
}
} else {
- memset(frame, 0, sizeof(frame));
+ memset(ptr, 0, sizeof(ptr));
}
+ Frame *frame = new Frame((char*)ptr, DVPACKAGE_SIZE, VF_DV, NULL, 0, AF_DV);
+
return frame;
}