continue;
}
// Copy data
- if (output + p2 * (depth >> 3) > output_end) {
+ if ((pic->linesize[0] > 0 && output + p2 * (depth >> 3) > output_end)
+ ||(pic->linesize[0] < 0 && output + p2 * (depth >> 3) < output_end)) {
src += p2 * (depth >> 3);
continue;
}
src += 4;
break;
}
- if (output + p1 * (depth >> 3) > output_end)
+ if ((pic->linesize[0] > 0 && output + p1 * (depth >> 3) > output_end)
+ ||(pic->linesize[0] < 0 && output + p1 * (depth >> 3) < output_end))
continue;
for(i = 0; i < p1; i++) {
switch(depth){