summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-04-08 17:09:32 +0200
committerAlexander Larsson <alexl@redhat.com>2010-04-08 17:09:32 +0200
commitde4306af331f5a68c28949c5cfed60adea24f753 (patch)
tree47cb5aa82829eba5b90a6f2d6449e8a8e69c2e2c /client
parent18485cef06283c17ddd98fd5411b71bcb64201a3 (diff)
downloadspice-de4306af331f5a68c28949c5cfed60adea24f753.tar.gz
spice-de4306af331f5a68c28949c5cfed60adea24f753.tar.xz
spice-de4306af331f5a68c28949c5cfed60adea24f753.zip
Initialize _kill_mark so we don't get spurious valgrind warnings
Diffstat (limited to 'client')
-rw-r--r--client/display_channel.cpp1
-rw-r--r--client/mjpeg_decoder.cpp14
2 files changed, 9 insertions, 6 deletions
diff --git a/client/display_channel.cpp b/client/display_channel.cpp
index 6427ae4d..9219568a 100644
--- a/client/display_channel.cpp
+++ b/client/display_channel.cpp
@@ -264,6 +264,7 @@ VideoStream::VideoStream(RedClient& client, Canvas& canvas, DisplayChannel& chan
, _clip (NULL)
, _frames_head (0)
, _frames_tail (0)
+ , _kill_mark (0)
, _uncompressed_data (NULL)
, _update_mark (0)
, _update_time (0)
diff --git a/client/mjpeg_decoder.cpp b/client/mjpeg_decoder.cpp
index df0dbad0..cf3e44d3 100644
--- a/client/mjpeg_decoder.cpp
+++ b/client/mjpeg_decoder.cpp
@@ -113,13 +113,15 @@ void MJpegDecoder::convert_scanline(void)
row = (uint32_t *)(_frame + _y * _stride);
s = _scanline;
+
+ /* TODO after major bump.
+ We need to check for the old major and for backwards compat
+ a) swap r and b
+ b) to-yuv with right values and then from-yuv with old wrong values
+ */
+
for (x = 0; x < _width; x++) {
- /* This switches the order of red and blue.
- This is not accidental, but for backwards
- compatibility, since a bug in the old
- ffmpeg-using mjpeg code got these switched
- due to endianness issues. */
- c = s[0] | s[1] << 8 | s[2] << 16;
+ c = s[0] << 16 | s[1] << 8 | s[2];
s += 3;
*row++ = c;
}