aboutsummaryrefslogtreecommitdiff
path: root/video/theora_decoder.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-03 04:11:40 +0200
committerJohannes Schickel2013-08-03 04:14:08 +0200
commit0cb1504a5b96ad90634a86af8cad30ecc6588517 (patch)
tree4dc467c9cb6b1487acd333a86b6576287dc510e3 /video/theora_decoder.cpp
parent9a80fa88e0742c38eeb32fd91334570fff6c60ae (diff)
downloadscummvm-rg350-0cb1504a5b96ad90634a86af8cad30ecc6588517.tar.gz
scummvm-rg350-0cb1504a5b96ad90634a86af8cad30ecc6588517.tar.bz2
scummvm-rg350-0cb1504a5b96ad90634a86af8cad30ecc6588517.zip
VIDEO: Do not set Surface::pixels directly anymore.
Diffstat (limited to 'video/theora_decoder.cpp')
-rw-r--r--video/theora_decoder.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/video/theora_decoder.cpp b/video/theora_decoder.cpp
index 63aa93e2f5..53e528faf2 100644
--- a/video/theora_decoder.cpp
+++ b/video/theora_decoder.cpp
@@ -262,11 +262,8 @@ TheoraDecoder::TheoraVideoTrack::TheoraVideoTrack(const Graphics::PixelFormat &f
_surface.create(theoraInfo.frame_width, theoraInfo.frame_height, format);
// Set up a display surface
- _displaySurface.pixels = _surface.getBasePtr(theoraInfo.pic_x, theoraInfo.pic_y);
- _displaySurface.w = theoraInfo.pic_width;
- _displaySurface.h = theoraInfo.pic_height;
- _displaySurface.format = format;
- _displaySurface.pitch = _surface.pitch;
+ _displaySurface.init(theoraInfo.pic_width, theoraInfo.pic_height, _surface.pitch,
+ _surface.getBasePtr(theoraInfo.pic_x, theoraInfo.pic_y), format);
// Set the frame rate
_frameRate = Common::Rational(theoraInfo.fps_numerator, theoraInfo.fps_denominator);
@@ -280,7 +277,7 @@ TheoraDecoder::TheoraVideoTrack::~TheoraVideoTrack() {
th_decode_free(_theoraDecode);
_surface.free();
- _displaySurface.pixels = 0;
+ _displaySurface.setPixels(0);
}
bool TheoraDecoder::TheoraVideoTrack::decodePacket(ogg_packet &oggPacket) {