author | alwin <alwin> | 2005-03-31 14:24:17 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-31 14:24:17 (UTC) |
commit | b135ff0f8c4d1876eea8ecc81e2a821ec8e9cb9a (patch) (side-by-side diff) | |
tree | 8cc7536354402f62dd99aac590dd91365abe5183 /noncore/multimedia/opieplayer2 | |
parent | db876361603ccf1664698df926a3c61d32315101 (diff) | |
download | opie-b135ff0f8c4d1876eea8ecc81e2a821ec8e9cb9a.zip opie-b135ff0f8c4d1876eea8ecc81e2a821ec8e9cb9a.tar.gz opie-b135ff0f8c4d1876eea8ecc81e2a821ec8e9cb9a.tar.bz2 |
fix for the segfaults when displaying videos (it just had sometimes
invalid inputimages when repainting)
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp index 1ac9277..9e86041 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp +++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp @@ -268,37 +268,39 @@ void XineVideoWidget::setLogo ( QImage* logo ) { delete m_logo; m_logo = logo; } void XineVideoWidget::setVideoFrame ( uchar* img, int w, int h, int bpl ) { bool rot90 = (( -m_rotation ) & 1 ); if ( rot90 ) { // if the rotation is 90 or 270 we have to swap width / height int d = w; w = h; h = d; } m_lastframe = m_thisframe; m_thisframe. setRect (( width ( ) - w ) / 2, ( height ( ) - h ) / 2, w , h ); m_buff = img; m_bytes_per_line_frame = bpl; // only repaint the area that *really* needs to be repainted repaint ((( m_thisframe & m_lastframe ) != m_lastframe ) ? m_lastframe : m_thisframe, false ); + // ensure that we always have a valid frame! + m_buff = 0; } void XineVideoWidget::resizeEvent ( QResizeEvent * ) { emit videoResized( videoSize() ); } void XineVideoWidget::mouseReleaseEvent ( QMouseEvent * /*me*/ ) { emit clicked(); } |