From fa2a526f04b1f51201fbb837fa430f93609938e8 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 24 Jan 2013 17:28:22 +0100 Subject: [PATCH] codecparsers: vc1: fix bitplanes decoding (DIFF6 or NORM6). Fix decoding of DIFF6 or NORM6 bitplanes with an odd number of lines (3x2 "horizontal" tiles). In this case, we have to skip the first line of macroblocks but number of bytes was used to do so, instead of the actual size. This fixes decoding for the video sample attached to: https://bugzilla.gnome.org/show_bug.cgi?id=668565 https://bugzilla.gnome.org/show_bug.cgi?id=692461 Signed-off-by: Gwenole Beauchesne --- gst-libs/gst/codecparsers/gstvc1parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c index 093fec830d..6df75e51c9 100644 --- a/gst-libs/gst/codecparsers/gstvc1parser.c +++ b/gst-libs/gst/codecparsers/gstvc1parser.c @@ -529,7 +529,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data, } else { /* decode 3x2 "horizontal" tiles */ if (pdata) - pdata += (height & 1) * width; + pdata += (height & 1) * stride; for (y = height & 1; y < height; y += 2) { for (x = width % 3; x < width; x += 3) { if (!decode_vlc (br, &v, vc1_norm6_vlc_table,