mirror of
https://github.com/mpv-player/mpv
synced 2025-03-18 08:39:01 +00:00
support for negative strides (fixes -vf spp,flip crash)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15070 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f5fd8bb72a
commit
47f90af3ba
@ -25,7 +25,16 @@ static inline void * mem2agpcpy_pic(void * dst, void * src, int bytesPerLine, in
|
||||
int i;
|
||||
void *retval=dst;
|
||||
|
||||
if(dstStride == srcStride) mem2agpcpy(dst, src, srcStride*height);
|
||||
if(dstStride == srcStride)
|
||||
{
|
||||
if (srcStride < 0) {
|
||||
src += (height-1)*srcStride;
|
||||
dst += (height-1)*dstStride;
|
||||
srcStride = -srcStride;
|
||||
}
|
||||
|
||||
mem2agpcpy(dst, src, srcStride*height);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0; i<height; i++)
|
||||
@ -44,7 +53,16 @@ static inline void * memcpy_pic(void * dst, void * src, int bytesPerLine, int he
|
||||
int i;
|
||||
void *retval=dst;
|
||||
|
||||
if(dstStride == srcStride) memcpy(dst, src, srcStride*height);
|
||||
if(dstStride == srcStride)
|
||||
{
|
||||
if (srcStride < 0) {
|
||||
src += (height-1)*srcStride;
|
||||
dst += (height-1)*dstStride;
|
||||
srcStride = -srcStride;
|
||||
}
|
||||
|
||||
memcpy(dst, src, srcStride*height);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0; i<height; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user