[FFmpeg-cvslog] r26363 - trunk/libavcodec/lagarith.c
reimar
subversion
Sat Jan 15 13:44:48 CET 2011
Author: reimar
Date: Sat Jan 15 13:44:48 2011
New Revision: 26363
Log:
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.
Modified:
trunk/libavcodec/lagarith.c
Modified: trunk/libavcodec/lagarith.c
==============================================================================
--- trunk/libavcodec/lagarith.c Sat Jan 15 12:13:07 2011 (r26362)
+++ trunk/libavcodec/lagarith.c Sat Jan 15 13:44:48 2011 (r26363)
@@ -405,9 +405,13 @@ static int lag_decode_arith_plane(Lagari
}
}
} 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);
More information about the ffmpeg-cvslog
mailing list