diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-19 04:45:45 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-19 04:45:45 +0000 |
commit | aaf4c414a6a11cd32956feb5008816221f2f93cb (patch) | |
tree | 7d5dd5f1a8c5dcbd6a38e046cc132a1fa0c502cb | |
parent | 5d12d44a25175f64175ed57711ede209c41c43e4 (diff) | |
download | mpv-aaf4c414a6a11cd32956feb5008816221f2f93cb.tar.bz2 mpv-aaf4c414a6a11cd32956feb5008816221f2f93cb.tar.xz |
Use calloc instead of malloc when allocate vobsub_t.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25459 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | vobsub.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -1106,23 +1106,13 @@ vobsub_parse_ifo(void* this, const char *const name, unsigned int *palette, unsi void * vobsub_open(const char *const name,const char *const ifo,const int force,void** spu) { - vobsub_t *vob = malloc(sizeof(vobsub_t)); + vobsub_t *vob = calloc(1, sizeof(vobsub_t)); if(spu) *spu = NULL; if (vobsubid == -2) vobsubid = vobsub_id; if (vob) { char *buf; - vob->custom = 0; - vob->have_palette = 0; - vob->orig_frame_width = 0; - vob->orig_frame_height = 0; - vob->spu_streams = NULL; - vob->spu_streams_size = 0; - vob->spu_streams_current = 0; - vob->spu_valid_streams_size = 0; - vob->delay = 0; - vob->forced_subs=0; buf = malloc(strlen(name) + 5); if (buf) { rar_stream_t *fd; |