From ddf178ed4cc5944637c876a85b4353427c62ad96 Mon Sep 17 00:00:00 2001 From: biocrasher Date: Sun, 16 Jul 2006 03:51:19 +0000 Subject: moved avd global into pdata struct git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@15 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/encode_image_buffer.c | 2 +- recordmydesktop/src/encode_sound_buffer.c | 4 ++-- recordmydesktop/src/recordmydesktop.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'recordmydesktop/src') diff --git a/recordmydesktop/src/encode_image_buffer.c b/recordmydesktop/src/encode_image_buffer.c index 76c4126..bc80abe 100644 --- a/recordmydesktop/src/encode_image_buffer.c +++ b/recordmydesktop/src/encode_image_buffer.c @@ -17,7 +17,7 @@ void *EncodeImageBuffer(void *pdata){ pthread_mutex_unlock(&((ProgData *)pdata)->yuv_mutex); theora_encode_packetout(&((ProgData *)pdata)->enc_data->m_th_st,0,&((ProgData *)pdata)->enc_data->m_ogg_pckt1); ogg_stream_packetin(&((ProgData *)pdata)->enc_data->m_ogg_ts,&((ProgData *)pdata)->enc_data->m_ogg_pckt1); - avd+=((ProgData *)pdata)->frametime*2*((ProgData *)pdata)->args.channels; + ((ProgData *)pdata)->avd+=((ProgData *)pdata)->frametime*2*((ProgData *)pdata)->args.channels; } //last packet if(theora_encode_YUVin(&((ProgData *)pdata)->enc_data->m_th_st,&((ProgData *)pdata)->enc_data->yuv)){ diff --git a/recordmydesktop/src/encode_sound_buffer.c b/recordmydesktop/src/encode_sound_buffer.c index 1c42ae8..03b4043 100644 --- a/recordmydesktop/src/encode_sound_buffer.c +++ b/recordmydesktop/src/encode_sound_buffer.c @@ -25,7 +25,7 @@ void *EncodeSoundBuffer(void *pdata){ ((ProgData *)pdata)->sound_buffer=((ProgData *)pdata)->sound_buffer->next; pthread_mutex_unlock(&((ProgData *)pdata)->sound_buffer_mutex); - if (avd>0){ + if (((ProgData *)pdata)->avd>0){ vorbis_buffer=vorbis_analysis_buffer(&((ProgData *)pdata)->enc_data->m_vo_dsp,sampread); for(i=0;ienc_data->m_vo_dsp,&((ProgData *)pdata)->enc_data->m_ogg_pckt2)) ogg_stream_packetin(&((ProgData *)pdata)->enc_data->m_ogg_vs,&((ProgData *)pdata)->enc_data->m_ogg_pckt2); } - avd-=((ProgData *)pdata)->periodtime; + ((ProgData *)pdata)->avd-=((ProgData *)pdata)->periodtime; } free(buff); } diff --git a/recordmydesktop/src/recordmydesktop.c b/recordmydesktop/src/recordmydesktop.c index e438f7f..89f9892 100644 --- a/recordmydesktop/src/recordmydesktop.c +++ b/recordmydesktop/src/recordmydesktop.c @@ -91,7 +91,7 @@ int main(int argc,char **argv){ pthread_cond_init(&pdata.image_buffer_ready,NULL); pthread_cond_init(&pdata.sound_buffer_ready,NULL); pthread_cond_init(&pdata.sound_data_read,NULL); - pdata.list_selector=Paused=Aborted=avd=0; + pdata.list_selector=Paused=Aborted=pdata.avd=0; pdata.running=1; time_cond=&pdata.time_cond; pause_cond=&pdata.pause_cond; -- cgit v1.2.3