From 0cb1504a5b96ad90634a86af8cad30ecc6588517 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Aug 2013 04:11:40 +0200 Subject: VIDEO: Do not set Surface::pixels directly anymore. --- video/theora_decoder.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'video/theora_decoder.cpp') 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) { -- cgit v1.2.3 From 6454721e31c01fc94be2cdc1ffb0852c3c8a33b8 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Mon, 12 Aug 2013 00:11:10 +0200 Subject: VIDEO: Set stereo as bool instead of writing channel amount directly --- video/theora_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/theora_decoder.cpp') diff --git a/video/theora_decoder.cpp b/video/theora_decoder.cpp index 53e528faf2..a0ee0a36b4 100644 --- a/video/theora_decoder.cpp +++ b/video/theora_decoder.cpp @@ -335,7 +335,7 @@ TheoraDecoder::VorbisAudioTrack::VorbisAudioTrack(Audio::Mixer::SoundType soundT vorbis_block_init(&_vorbisDSP, &_vorbisBlock); info = &vorbisInfo; - _audStream = Audio::makeQueuingAudioStream(vorbisInfo.rate, vorbisInfo.channels); + _audStream = Audio::makeQueuingAudioStream(vorbisInfo.rate, vorbisInfo.channels != 1); _audioBufferFill = 0; _audioBuffer = 0; -- cgit v1.2.3