mirror of
https://github.com/mpv-player/mpv
synced 2025-02-25 09:44:21 +00:00
When centering a video with odd width, be sure to start on a pixel boundary.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17729 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1cbeb57911
commit
34e08d15ea
@ -1005,8 +1005,9 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
|
||||
return 1;
|
||||
}
|
||||
|
||||
center = frame_buffer + (out_width - in_width) * fb_pixel_size /
|
||||
2 + ( (out_height - in_height) / 2 ) * fb_line_len +
|
||||
center = frame_buffer +
|
||||
( (out_width - in_width) / 2 ) * fb_pixel_size +
|
||||
( (out_height - in_height) / 2 ) * fb_line_len +
|
||||
x_offset * fb_pixel_size + y_offset * fb_line_len;
|
||||
|
||||
mp_msg(MSGT_VO, MSGL_DBG2, "frame_buffer @ %p\n", frame_buffer);
|
||||
|
@ -280,8 +280,9 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
|
||||
}
|
||||
}
|
||||
|
||||
center = frame_buffer + (out_width - in_width) * fb_pixel_size /
|
||||
2 + ( (out_height - in_height) / 2 ) * fb_line_len;
|
||||
center = frame_buffer +
|
||||
( (out_width - in_width) / 2 ) * fb_pixel_size +
|
||||
( (out_height - in_height) / 2 ) * fb_line_len;
|
||||
|
||||
#ifndef USE_CONVERT2FB
|
||||
if (!(next_frame = (uint8_t *) realloc(next_frame, in_width * in_height * fb_pixel_size))) {
|
||||
|
Loading…
Reference in New Issue
Block a user