summaryrefslogtreecommitdiff
path: root/libavcodec/libxvid_rc.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-06-06 14:13:02 +0200
committerDiego Biurrun <diego@biurrun.de>2012-03-28 09:38:33 +0200
commita92be9b856bd11b081041c43c25d442028fe9a63 (patch)
tree32f852fdf904a30238c789e57510be710eaa7826 /libavcodec/libxvid_rc.c
parent856c8e0a049dc7069b7504d3aaa48549c75852de (diff)
downloadffmpeg-a92be9b856bd11b081041c43c25d442028fe9a63.tar.gz
Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
Diffstat (limited to 'libavcodec/libxvid_rc.c')
-rw-r--r--libavcodec/libxvid_rc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/libxvid_rc.c b/libavcodec/libxvid_rc.c
index 7a0e60dd09..e87142749e 100644
--- a/libavcodec/libxvid_rc.c
+++ b/libavcodec/libxvid_rc.c
@@ -35,8 +35,8 @@ extern unsigned int xvid_debug;
int ff_xvid_rate_control_init(MpegEncContext *s){
char *tmp_name;
int fd, i;
- xvid_plg_create_t xvid_plg_create;
- xvid_plugin_2pass2_t xvid_2pass2;
+ xvid_plg_create_t xvid_plg_create = { 0 };
+ xvid_plugin_2pass2_t xvid_2pass2 = { 0 };
//xvid_debug=-1;
@@ -63,7 +63,6 @@ int ff_xvid_rate_control_init(MpegEncContext *s){
close(fd);
- memset(&xvid_2pass2, 0, sizeof(xvid_2pass2));
xvid_2pass2.version= XVID_MAKE_VERSION(1,1,0);
xvid_2pass2.filename= tmp_name;
xvid_2pass2.bitrate= s->avctx->bit_rate;
@@ -71,7 +70,6 @@ int ff_xvid_rate_control_init(MpegEncContext *s){
xvid_2pass2.vbv_maxrate= s->avctx->rc_max_rate;
xvid_2pass2.vbv_initial= s->avctx->rc_initial_buffer_occupancy;
- memset(&xvid_plg_create, 0, sizeof(xvid_plg_create));
xvid_plg_create.version= XVID_MAKE_VERSION(1,1,0);
xvid_plg_create.fbase= s->avctx->time_base.den;
xvid_plg_create.fincr= s->avctx->time_base.num;
@@ -85,9 +83,8 @@ int ff_xvid_rate_control_init(MpegEncContext *s){
}
float ff_xvid_rate_estimate_qscale(MpegEncContext *s, int dry_run){
- xvid_plg_data_t xvid_plg_data;
+ xvid_plg_data_t xvid_plg_data = { 0 };
- memset(&xvid_plg_data, 0, sizeof(xvid_plg_data));
xvid_plg_data.version= XVID_MAKE_VERSION(1,1,0);
xvid_plg_data.width = s->width;
xvid_plg_data.height= s->height;