summaryrefslogtreecommitdiff
path: root/src/libxinevdec/bitplane.c
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/libxinevdec/bitplane.c
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/libxinevdec/bitplane.c')
-rw-r--r--src/libxinevdec/bitplane.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libxinevdec/bitplane.c b/src/libxinevdec/bitplane.c
index bf868ad2a..b6940813f 100644
--- a/src/libxinevdec/bitplane.c
+++ b/src/libxinevdec/bitplane.c
@@ -1158,8 +1158,8 @@ static void bitplane_decode_data (video_decoder_t *this_gen,
this->bytes_per_pixel = 1;
/* New Buffer for indexes (palette based formats) */
- this->index_buf = xine_xmalloc( this->num_pixel * this->bytes_per_pixel );
- this->index_buf_hist = xine_xmalloc( this->num_pixel * this->bytes_per_pixel );
+ this->index_buf = xine_xcalloc( this->num_pixel, this->bytes_per_pixel );
+ this->index_buf_hist = xine_xcalloc( this->num_pixel, this->bytes_per_pixel );
this->num_bitplanes = bih->biPlanes;
this->camg_mode = bih->biCompression;
@@ -1314,8 +1314,8 @@ static void bitplane_decode_data (video_decoder_t *this_gen,
}
}
if( this->index_buf == NULL ) {
- this->index_buf = xine_xmalloc( (this->num_pixel * this->bytes_per_pixel) );
- this->index_buf_hist = xine_xmalloc( (this->num_pixel * this->bytes_per_pixel) );
+ this->index_buf = xine_xcalloc( this->num_pixel, this->bytes_per_pixel );
+ this->index_buf_hist = xine_xcalloc( this->num_pixel, this->bytes_per_pixel );
for (i = 0; i < (this->num_pixel * this->bytes_per_pixel); i++) {
this->index_buf[i] = 0;
this->index_buf_hist[i] = 0;