summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
index 791818e..0833784 100644
--- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp
+++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
@@ -46,19 +46,20 @@
// 0 deg rot: copy a line from src to dst (use libc memcpy)
// 180 deg rot: copy a line from src to dst reversed
static inline void memcpy_rev ( void *dst, void *src, size_t len )
{
- ((char *) src ) += len;
-
len >>= 1;
+
+ ((char *) src ) += ( len << 1 );
+
while ( len-- )
*((short int *) dst )++ = *--((short int *) src );
}
// 90 deg rot: copy a column from src to dst
static inline void memcpy_step ( void *dst, void *src, size_t len, size_t step )
{
@@ -187,17 +188,17 @@ void XineVideoWidget::paintEvent ( QPaintEvent * )
else {
if ( leftfill )
memset ( dst, 0, leftfill ); // "left" border -> black
if ( framefill ) { // blit in the video frame
// see above for an explanation of the different memcpys
switch ( rot ) {
- case 0: memcpy ( dst + leftfill, src, framefill ); break;
+ case 0: memcpy ( dst + leftfill, src, framefill & ~1 ); break;
case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break;
case 2: memcpy_rev ( dst + leftfill, src, framefill ); break;
case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break;
default: break;
}
}
if ( rightfill )
memset ( dst + leftfill + framefill, 0, rightfill ); // "right" border -> black