diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-04-08 17:09:32 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-04-08 17:09:32 +0200 |
commit | de4306af331f5a68c28949c5cfed60adea24f753 (patch) | |
tree | 47cb5aa82829eba5b90a6f2d6449e8a8e69c2e2c /client/mjpeg_decoder.cpp | |
parent | 18485cef06283c17ddd98fd5411b71bcb64201a3 (diff) | |
download | spice-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/mjpeg_decoder.cpp')
-rw-r--r-- | client/mjpeg_decoder.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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; } |