changeset 32448:aa237330969d

Replace malloc+memset by calloc.
author reimar
date Tue, 26 Oct 2010 18:59:00 +0000
parents b83aa4fc363c
children f39c946f7ff7
files libmpdemux/demuxer.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Sat Oct 23 21:09:45 2010 +0000
+++ b/libmpdemux/demuxer.c	Tue Oct 26 18:59:00 2010 +0000
@@ -229,8 +229,7 @@
 demuxer_t *new_demuxer(stream_t *stream, int type, int a_id, int v_id,
                        int s_id, char *filename)
 {
-    demuxer_t *d = malloc(sizeof(demuxer_t));
-    memset(d, 0, sizeof(demuxer_t));
+    demuxer_t *d = calloc(1, sizeof(*d));
     d->stream = stream;
     d->stream_pts = MP_NOPTS_VALUE;
     d->reference_clock = MP_NOPTS_VALUE;