From 5e279996eb1f448712d1a6b64218a6cf65159a57 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 16:35:12 +0200 Subject: VIDEO: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. Certain codecs seem to use a Surface with Bpp 2, but do not have any proper format description. Whoever is maintaining these should check this commit and fix the format properly. --- video/qt_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/qt_decoder.cpp') diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 826b7bfcaf..6c0c34a40c 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -526,7 +526,7 @@ void QuickTimeDecoder::init() { if (getScaleFactorX() != 1 || getScaleFactorY() != 1) { // We have to initialize the scaled surface _scaledSurface = new Graphics::Surface(); - _scaledSurface->create(getWidth(), getHeight(), getPixelFormat().bytesPerPixel); + _scaledSurface->create(getWidth(), getHeight(), getPixelFormat()); } } } -- cgit v1.2.3 From f90bbf9cfad20c6122b98d8b2f99c2cdaa5ce5d6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 17:25:08 +0200 Subject: VIDEO: Prefer Surface::format over Surface::bytesPerPixel. --- video/qt_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/qt_decoder.cpp') diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 6c0c34a40c..24225ece89 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -381,7 +381,7 @@ const Graphics::Surface *QuickTimeDecoder::scaleSurface(const Graphics::Surface for (int32 j = 0; j < _scaledSurface->h; j++) for (int32 k = 0; k < _scaledSurface->w; k++) - memcpy(_scaledSurface->getBasePtr(k, j), frame->getBasePtr((k * getScaleFactorX()).toInt() , (j * getScaleFactorY()).toInt()), frame->bytesPerPixel); + memcpy(_scaledSurface->getBasePtr(k, j), frame->getBasePtr((k * getScaleFactorX()).toInt() , (j * getScaleFactorY()).toInt()), frame->format.bytesPerPixel); return _scaledSurface; } -- cgit v1.2.3