diff options
author | deva <deva> | 2005-05-17 19:16:26 +0000 |
---|---|---|
committer | deva <deva> | 2005-05-17 19:16:26 +0000 |
commit | 511b49048fb62a56f7049045e0e3d85c5b3e8745 (patch) | |
tree | 989b7b2cbe69f226c3c1282f486a6aa13ce9b6a5 /src/mov_encoder.cc | |
parent | c3ac81724d3d73925a23f3ea41f14c3d557d92a5 (diff) |
Made new mpeg writer work, with proper file permissions.
Diffstat (limited to 'src/mov_encoder.cc')
-rw-r--r-- | src/mov_encoder.cc | 11 |
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); |