diff options
author | wm4 <wm4@nowhere> | 2012-10-07 01:21:29 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-24 21:56:33 +0200 |
commit | 7b203b5e05d9873e279f8432d4ffb3d9facc5e23 (patch) | |
tree | 7b5bcbaef714ab7e6feaa7a7505d981c588a2c3e /screenshot.c | |
parent | d5e47632430b93a03748007748ee1fc122932712 (diff) | |
download | mpv-7b203b5e05d9873e279f8432d4ffb3d9facc5e23.tar.bz2 mpv-7b203b5e05d9873e279f8432d4ffb3d9facc5e23.tar.xz |
img_convert: fix alignment for RGBA images
draw_bmp.c uses libswscale, which has strict alignment requirements on
input images. Since imp_convert.c is currently the only producer of RGBA
sub-bitmaps, the overall code becomes easier if the alignment is done on
image allocation, rather than forcing draw_bmp.c to create an aligned
copy.
talloc doesn't align to 16 bytes, as required by libswscale. Apparently,
system malloc (glibc/Linux/32 bit) aligns to 8 bytes only, so talloc's
own code to align to 16 bytes is ineffective. Work around by using
mp_image to allocate the image.
Diffstat (limited to 'screenshot.c')
0 files changed, 0 insertions, 0 deletions