[MPlayer-cvslog] r32694 - trunk/libmpdemux/demux_ts.c

reimar subversion at mplayerhq.hu
Sat Dec 11 23:22:54 CET 2010


Author: reimar
Date: Sat Dec 11 23:22:54 2010
New Revision: 32694

Log:
Replace malloc+memset with calloc and use sizeof(*variable).

Modified:
   trunk/libmpdemux/demux_ts.c

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	Sat Dec 11 23:19:46 2010	(r32693)
+++ trunk/libmpdemux/demux_ts.c	Sat Dec 11 23:22:54 2010	(r32694)
@@ -2184,10 +2184,9 @@ static ES_stream_t *new_pid(ts_priv_t *p
 {
 	ES_stream_t *tss;
 
-	tss = malloc(sizeof(ES_stream_t));
+	tss = calloc(sizeof(*tss), 1);
 	if(! tss)
 		return NULL;
-	memset(tss, 0, sizeof(ES_stream_t));
 	tss->pid = pid;
 	tss->last_cc = -1;
 	tss->type = UNKNOWN;


More information about the MPlayer-cvslog mailing list