mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 17:26:49 +08:00
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
This commit is contained in:
parent
1f923e3ea6
commit
53a7923b15
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 953
|
||||
Version: 955
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 953
|
||||
#define LIBYUV_VERSION 955
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -66,7 +66,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size,
|
||||
int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height;
|
||||
if (need_buf) {
|
||||
int argb_size = crop_width * abs_crop_height * 4;
|
||||
rotate_buffer = malloc(argb_size);
|
||||
rotate_buffer = (uint8*)malloc(argb_size);
|
||||
if (!rotate_buffer) {
|
||||
return 1; // Out of memory runtime error.
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ int ConvertToI420(const uint8* sample,
|
||||
if (need_buf) {
|
||||
int y_size = crop_width * abs_crop_height;
|
||||
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) {
|
||||
return 1; // Out of memory runtime error.
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user