Commit 53a7923b authored by fbarchard@google.com's avatar fbarchard@google.com

cast malloc to uint8*

BUG=303
TESTED=visual c higher warnings
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/6639004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@955 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 1f923e3e
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 953 Version: 955
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 953 #define LIBYUV_VERSION 955
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -66,7 +66,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size, ...@@ -66,7 +66,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size,
int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height; int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height;
if (need_buf) { if (need_buf) {
int argb_size = crop_width * abs_crop_height * 4; int argb_size = crop_width * abs_crop_height * 4;
rotate_buffer = malloc(argb_size); rotate_buffer = (uint8*)malloc(argb_size);
if (!rotate_buffer) { if (!rotate_buffer) {
return 1; // Out of memory runtime error. return 1; // Out of memory runtime error.
} }
......
...@@ -71,7 +71,7 @@ int ConvertToI420(const uint8* sample, ...@@ -71,7 +71,7 @@ int ConvertToI420(const uint8* sample,
if (need_buf) { if (need_buf) {
int y_size = crop_width * abs_crop_height; int y_size = crop_width * abs_crop_height;
int uv_size = ((crop_width + 1) / 2) * ((abs_crop_height + 1) / 2); int uv_size = ((crop_width + 1) / 2) * ((abs_crop_height + 1) / 2);
rotate_buffer = malloc(y_size + uv_size * 2); rotate_buffer = (uint8*)malloc(y_size + uv_size * 2);
if (!rotate_buffer) { if (!rotate_buffer) {
return 1; // Out of memory runtime error. return 1; // Out of memory runtime error.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment