summaryrefslogtreecommitdiff
path: root/src/rmd_encode_image_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rmd_encode_image_buffer.c')
-rw-r--r--src/rmd_encode_image_buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rmd_encode_image_buffer.c b/src/rmd_encode_image_buffer.c
index 57ac5ce..d83c694 100644
--- a/src/rmd_encode_image_buffer.c
+++ b/src/rmd_encode_image_buffer.c
@@ -74,10 +74,13 @@ void *rmdEncodeImageBuffer(ProgData *pdata) {
while (theora_encode_packetout(&enc_data->m_th_st, 0, &enc_data->m_ogg_pckt1) > 0) {
pthread_mutex_lock(&pdata->libogg_mutex);
ogg_stream_packetin(&enc_data->m_ogg_ts, &enc_data->m_ogg_pckt1);
- pdata->avd += pdata->frametime;
pthread_mutex_unlock(&pdata->libogg_mutex);
}
+ pthread_mutex_lock(&pdata->avd_mutex);
+ pdata->avd += pdata->frametime * n_frames;
+ pthread_mutex_unlock(&pdata->avd_mutex);
+
last_encode_frameno = encode_frameno;
}
© All Rights Reserved