diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-14 18:30:19 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-14 18:30:19 +0200 |
commit | e0565eaa178fc0ad4eabcbc48c50085f95bb56a8 (patch) | |
tree | 2538a0670c63086213af10fcc8f56532ce7a5792 /src/libxinevdec | |
parent | dc36f8d045cf4f723c44766f44c92e1810e37f4f (diff) | |
download | xine-lib-e0565eaa178fc0ad4eabcbc48c50085f95bb56a8.tar.gz xine-lib-e0565eaa178fc0ad4eabcbc48c50085f95bb56a8.tar.bz2 |
Use xine_xcalloc instead of xine_xmalloc when mutiplying the number of elements by the size of the single element.
Diffstat (limited to 'src/libxinevdec')
-rw-r--r-- | src/libxinevdec/bitplane.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libxinevdec/bitplane.c b/src/libxinevdec/bitplane.c index 373d5d8b1..62f7a19db 100644 --- a/src/libxinevdec/bitplane.c +++ b/src/libxinevdec/bitplane.c @@ -1160,8 +1160,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; @@ -1316,8 +1316,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; |