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.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc
index 38622c6..fa83830 100644
--- a/src/mov_encoder.cc
+++ b/src/mov_encoder.cc
@@ -39,6 +39,9 @@
/*
* $Log$
+ * Revision 1.34 2005/07/05 23:15:16 deva
+ * *** empty log message ***
+ *
* Revision 1.33 2005/07/02 11:39:52 deva
* Added some audiocode.
* Moved libfame code out of mov_encoder
@@ -144,8 +147,8 @@ MovEncoder::MovEncoder(sem_t *r_sem,
info = i;
info->info("MovEncoder");
- fame = new LibFAMEWrapper(info);
- lame = new LibLAMEWrapper(info);
+ // fame = new LibFAMEWrapper(info);
+ // lame = new LibLAMEWrapper(info);
running = true;
@@ -165,8 +168,8 @@ MovEncoder::~MovEncoder()
{
info->info("~MovEncoder");
- delete fame;
- delete lame;
+ // delete fame;
+ // delete lame;
}
// this runs in a thread
@@ -185,9 +188,13 @@ void MovEncoder::thread_main()
Frame *out_v_frame;
Frame *out_a_frame;
+ LibFAMEWrapper fame(info);
+
while(running) {
sem_wait(input_sem);
+ LibLAMEWrapper lame(info);
+
// Lock inout mutex
pthread_mutex_lock(input_mutex);
item = inputqueue->front();
@@ -203,11 +210,11 @@ void MovEncoder::thread_main()
in_frame = item->at(cnt);
// Encode video
- out_v_frame = fame->encode(in_frame);
+ out_v_frame = fame.encode(in_frame);
out_v_frame->number = in_frame->number+1;
// Encode audio
- out_a_frame = lame->encode(in_frame);
+ out_a_frame = lame.encode(in_frame);
out_a_frame->number = in_frame->number;
delete in_frame;