mirror of https://github.com/mpv-player/mpv
vo_corevideo: avoid dangerous casts
Declare variables with proper types to avoid dangerous pointer casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31805 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5f5a12a939
commit
0a5ff5eef3
|
@ -685,8 +685,7 @@ static int control(uint32_t request, void *data)
|
||||||
*/
|
*/
|
||||||
- (void)reshape
|
- (void)reshape
|
||||||
{
|
{
|
||||||
uint32_t d_width;
|
int d_width, d_height;
|
||||||
uint32_t d_height;
|
|
||||||
|
|
||||||
NSRect frame = [self frame];
|
NSRect frame = [self frame];
|
||||||
vo_dwidth = frame.size.width;
|
vo_dwidth = frame.size.width;
|
||||||
|
@ -702,7 +701,7 @@ static int control(uint32_t request, void *data)
|
||||||
//set texture frame
|
//set texture frame
|
||||||
if(vo_keepaspect)
|
if(vo_keepaspect)
|
||||||
{
|
{
|
||||||
aspect( (int *)&d_width, (int *)&d_height, A_WINZOOM);
|
aspect(&d_width, &d_height, A_WINZOOM);
|
||||||
|
|
||||||
textureFrame = NSMakeRect((vo_dwidth - d_width) / 2, (vo_dheight - d_height) / 2, d_width, d_height);
|
textureFrame = NSMakeRect((vo_dwidth - d_width) / 2, (vo_dheight - d_height) / 2, d_width, d_height);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue