summaryrefslogtreecommitdiff
path: root/src/mov_encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mov_encoder.cc')
-rw-r--r--src/mov_encoder.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc
index bb24c5a..172051d 100644
--- a/src/mov_encoder.cc
+++ b/src/mov_encoder.cc
@@ -39,6 +39,10 @@
/*
* $Log$
+ * Revision 1.22 2005/05/17 19:16:26 deva
+ *
+ * Made new mpeg writer work, with proper file permissions.
+ *
* Revision 1.21 2005/05/17 14:30:56 deva
* Added code, preparing threaded encoding.
*
@@ -288,15 +292,18 @@ Frame *MovEncoder::encode_video(Frame *dvframe)
// Allocate a new frame for the output
Frame *output = new Frame(NULL, FAME_BUFFER_SIZE);
- unsigned int pt = (unsigned int)output->data;
+ output->size = 0;
+ unsigned char* pt = output->data;
// Encode YUV frame and write it to disk.
fame_start_frame(fame_context, &yuv, 0);
int written;
+
while((written = fame_encode_slice(fame_context))) {
// fwrite(fame_buffer, written, 1, f);
- memcpy((void *)pt, fame_buffer, written);
+ memcpy(pt, fame_buffer, written);
pt += written;
+ output->size += written;
}
fame_end_frame(fame_context,0);