summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 18:30:19 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 18:30:19 +0200
commitcb2dc09164a533fc544c59469f6f8bd7d1cc5e04 (patch)
treeb6681a749f382c15f1c84f554961a9c64bd13742 /src/demuxers
parenta99bea5eb67de57de5aa3259b5b5432d4aaa9c1a (diff)
downloadxine-lib-cb2dc09164a533fc544c59469f6f8bd7d1cc5e04.tar.gz
xine-lib-cb2dc09164a533fc544c59469f6f8bd7d1cc5e04.tar.bz2
Use xine_xcalloc instead of xine_xmalloc when mutiplying the number of elements by the size of the single element.
(transplanted from 512894f517c423fed0cadeca0d46c6d909403106) --HG-- extra : transplant_source : Q%28%94%F5%17%C4%23%FE%D0%CA%DE%CA%0DF%C6%D9%09%401%06
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_real.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index fa4e87e07..761c55bf8 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -769,7 +769,7 @@ unknown:
this->video_stream->mdpr->avg_bit_rate);
/* Allocate fragment offset table */
- this->fragment_tab = xine_xmalloc(FRAGMENT_TAB_SIZE*sizeof(uint32_t));
+ this->fragment_tab = xine_xcalloc(FRAGMENT_TAB_SIZE, sizeof(uint32_t));
this->fragment_tab_max = FRAGMENT_TAB_SIZE;
}
@@ -1386,7 +1386,7 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) {
frames = (stream_read_word(this) & 0xf0) >> 4;
/* 2 bytes per frame size */
- sizes = xine_xmalloc(frames*sizeof(int));
+ sizes = xine_xcalloc(frames, sizeof(int));
for(i = 0; i < frames; i++)
sizes[i] = stream_read_word(this);