diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-26 15:01:37 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-26 15:01:37 +0000 |
commit | b63759b175cf9ddd9735ca0d2f803fe62f69c3c3 (patch) | |
tree | a583febda46545afc4ed20ccbdbed0ae3165a5c4 /libmpdemux/demux_ts.c | |
parent | fad137d7fe3bfef6a258518a1e86a4d811d3b4b5 (diff) | |
download | mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.bz2 mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.xz |
Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_ts.c')
-rw-r--r-- | libmpdemux/demux_ts.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index d27ae76596..0a79dcded5 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -320,7 +320,7 @@ static void ts_add_stream(demuxer_t * demuxer, ES_stream_t *es) if(es->extradata && es->extradata_len) { - sh->wf = (WAVEFORMATEX *) malloc(sizeof (WAVEFORMATEX) + es->extradata_len); + sh->wf = malloc(sizeof (WAVEFORMATEX) + es->extradata_len); sh->wf->cbSize = es->extradata_len; memcpy(sh->wf + 1, es->extradata, es->extradata_len); } @@ -344,7 +344,7 @@ static void ts_add_stream(demuxer_t * demuxer, ES_stream_t *es) if(sh->format == VIDEO_AVC && es->extradata && es->extradata_len) { int w = 0, h = 0; - sh->bih = (BITMAPINFOHEADER *) calloc(1, sizeof(BITMAPINFOHEADER) + es->extradata_len); + sh->bih = calloc(1, sizeof(BITMAPINFOHEADER) + es->extradata_len); sh->bih->biSize= sizeof(BITMAPINFOHEADER) + es->extradata_len; sh->bih->biCompression = sh->format; memcpy(sh->bih + 1, es->extradata, es->extradata_len); @@ -680,7 +680,7 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param) pptr = &pes_priv1[es.pid]; if(pptr->pos < 64*1024) { - tmpbuf = (char*) realloc(pptr->buf, pptr->pos + es.size); + tmpbuf = realloc(pptr->buf, pptr->pos + es.size); if(tmpbuf != NULL) { pptr->buf = tmpbuf; @@ -1678,7 +1678,7 @@ static int collect_section(ts_section_t *section, int is_start, unsigned char *b { if(! section->buffer) { - section->buffer = (uint8_t*) malloc(4096+256); + section->buffer = malloc(4096 + 256); if(section->buffer == NULL) return 0; } @@ -2697,7 +2697,7 @@ static int fill_extradata(mp4_decoder_config_t * mp4_dec, ES_stream_t *tss) if(mp4_dec->buf_size > tss->extradata_alloc) { - tmp = (uint8_t *) realloc(tss->extradata, mp4_dec->buf_size); + tmp = realloc(tss->extradata, mp4_dec->buf_size); if(!tmp) return 0; tss->extradata = tmp; |