[SCM] libav/experimental: Lagarith: fix decoding of one-coloured frames by reading the per-plane color value instead of always taking 0 (resulting in green frames). Fixes issue issue2531.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:21:57 UTC 2013
The following commit has been merged in the experimental branch:
commit b0c8b8a69d37b55a03a600d753113f4314404080
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date: Sat Jan 15 12:44:48 2011 +0000
Lagarith: fix decoding of one-coloured frames by reading the per-plane
color value instead of always taking 0 (resulting in green frames).
Fixes issue issue2531.
Originally committed as revision 26363 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index 95179df..1bf61bd 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -405,9 +405,13 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
}
}
} else if (esc_count == 0xff) {
- /* Plane is a solid run of 0 bytes */
+ /* Plane is a solid run of given value */
for (i = 0; i < height; i++)
- memset(dst + i * stride, 0, width);
+ memset(dst + i * stride, src[1], width);
+ /* Do not apply prediction.
+ Note: memset to 0 above, setting first value to src[1]
+ and applying prediction gives the same result. */
+ return 0;
} else {
av_log(l->avctx, AV_LOG_ERROR,
"Invalid zero run escape code! (%#x)\n", esc_count);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list