Mercurial > mplayer.hg
comparison libmpdemux/demuxer.c @ 32448:aa237330969d
Replace malloc+memset by calloc.
author | reimar |
---|---|
date | Tue, 26 Oct 2010 18:59:00 +0000 |
parents | 0e036289e7ef |
children | f39c946f7ff7 |
comparison
equal
deleted
inserted
replaced
32447:b83aa4fc363c | 32448:aa237330969d |
---|---|
227 | 227 |
228 | 228 |
229 demuxer_t *new_demuxer(stream_t *stream, int type, int a_id, int v_id, | 229 demuxer_t *new_demuxer(stream_t *stream, int type, int a_id, int v_id, |
230 int s_id, char *filename) | 230 int s_id, char *filename) |
231 { | 231 { |
232 demuxer_t *d = malloc(sizeof(demuxer_t)); | 232 demuxer_t *d = calloc(1, sizeof(*d)); |
233 memset(d, 0, sizeof(demuxer_t)); | |
234 d->stream = stream; | 233 d->stream = stream; |
235 d->stream_pts = MP_NOPTS_VALUE; | 234 d->stream_pts = MP_NOPTS_VALUE; |
236 d->reference_clock = MP_NOPTS_VALUE; | 235 d->reference_clock = MP_NOPTS_VALUE; |
237 d->movi_start = stream->start_pos; | 236 d->movi_start = stream->start_pos; |
238 d->movi_end = stream->end_pos; | 237 d->movi_end = stream->end_pos; |