Mercurial > mplayer.hg
comparison libvo/gl_common.c @ 18988:a61ef37d3c71
Fix off-by-one error for negative strides (flipped image)
author | reimar |
---|---|
date | Mon, 10 Jul 2006 12:06:41 +0000 |
parents | 9f1bbc70c773 |
children | 4daef6e86041 |
comparison
equal
deleted
inserted
replaced
18987:1f08622dd297 | 18988:a61ef37d3c71 |
---|---|
488 int y_max = y + h; | 488 int y_max = y + h; |
489 if (w <= 0 || h <= 0) return; | 489 if (w <= 0 || h <= 0) return; |
490 if (slice <= 0) | 490 if (slice <= 0) |
491 slice = h; | 491 slice = h; |
492 if (stride < 0) { | 492 if (stride < 0) { |
493 data += h * stride; | 493 data += (h - 1) * stride; |
494 stride = -stride; | 494 stride = -stride; |
495 } | 495 } |
496 // this is not always correct, but should work for MPlayer | 496 // this is not always correct, but should work for MPlayer |
497 glAdjustAlignment(stride); | 497 glAdjustAlignment(stride); |
498 glPixelStorei(GL_UNPACK_ROW_LENGTH, stride / glFmt2bpp(format, type)); | 498 glPixelStorei(GL_UNPACK_ROW_LENGTH, stride / glFmt2bpp(format, type)); |