Reimar Döffinger <[email protected]> added the comment:
On Tue, Jan 11, 2011 at 04:27:41AM +0000, qyot27 wrote:
> The attached file contains 40 black frames followed by 40 white frames,
> encoded
> with Lagarith. When I attempt to convert the file, all frames turn green.
Below patch should fix it.
I intend to apply soon if there are no comments/objections.
Index: ffmpeg/libavcodec/lagarith.c
===================================================================
--- ffmpeg/libavcodec/lagarith.c (revision 26302)
+++ ffmpeg/libavcodec/lagarith.c (working copy)
@@ -405,9 +405,13 @@
}
}
} 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);
________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2531>
________________________________________________