summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/rmd_initialize_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop/src/rmd_initialize_data.c')
-rw-r--r--recordmydesktop/src/rmd_initialize_data.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/recordmydesktop/src/rmd_initialize_data.c b/recordmydesktop/src/rmd_initialize_data.c
index 166f8ea..486a82f 100644
--- a/recordmydesktop/src/rmd_initialize_data.c
+++ b/recordmydesktop/src/rmd_initialize_data.c
@@ -170,18 +170,18 @@ int rmdInitializeData(ProgData *pdata, EncData *enc_data, CacheData *cache_data)
else
rmdInitCacheData(pdata, enc_data, cache_data);
- for(i=0;i<(pdata->enc_data->yuv.y_width*pdata->enc_data->yuv.y_height);i++)
- pdata->enc_data->yuv.y[i]=0;
-
- for(i=0; i<(pdata->enc_data->yuv.uv_width*pdata->enc_data->yuv.uv_height); i++)
- pdata->enc_data->yuv.v[i]=pdata->enc_data->yuv.u[i]=127;
-
- yblocks = malloc(sizeof(u_int32_t)*(pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH)*
- (pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH));
- ublocks = malloc(sizeof(u_int32_t)*(pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH)*
- (pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH));
- vblocks = malloc(sizeof(u_int32_t)*(pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH)*
- (pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH));
+ for(i = 0; i < pdata->enc_data->yuv.y_width * pdata->enc_data->yuv.y_height; i++)
+ pdata->enc_data->yuv.y[i] = 0;
+
+ for(i = 0; i < pdata->enc_data->yuv.uv_width * pdata->enc_data->yuv.uv_height; i++)
+ pdata->enc_data->yuv.v[i] = pdata->enc_data->yuv.u[i] = 127;
+
+ yblocks = malloc((pdata->enc_data->yuv.y_width / Y_UNIT_WIDTH) *
+ (pdata->enc_data->yuv.y_height / Y_UNIT_WIDTH));
+ ublocks = malloc((pdata->enc_data->yuv.y_width / Y_UNIT_WIDTH) *
+ (pdata->enc_data->yuv.y_height / Y_UNIT_WIDTH));
+ vblocks = malloc((pdata->enc_data->yuv.y_width / Y_UNIT_WIDTH) *
+ (pdata->enc_data->yuv.y_height / Y_UNIT_WIDTH));
pdata->frametime=(1000000)/pdata->args.fps;
return 0;
© All Rights Reserved