[MPlayer-cvslog] r32534 - trunk/libmpdemux/demuxer.c

reimar subversion at mplayerhq.hu
Tue Oct 26 20:59:01 CEST 2010


Author: reimar
Date: Tue Oct 26 20:59:00 2010
New Revision: 32534

Log:
Replace malloc+memset by calloc.

Modified:
   trunk/libmpdemux/demuxer.c

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	Sat Oct 23 23:09:45 2010	(r32533)
+++ trunk/libmpdemux/demuxer.c	Tue Oct 26 20:59:00 2010	(r32534)
@@ -229,8 +229,7 @@ static const demuxer_desc_t *get_demuxer
 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;


More information about the MPlayer-cvslog mailing list