From 73213e273f04389660d8ab9b5ae88743d3a1e55c Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Tue, 22 Jan 2013 10:38:20 +0100 Subject: [PATCH] codecparsers: vc1: fix calculation of ALTPQUANT. Fix calculation of ALTPQUANT when DQUANT == 1. PQDIFF alters ALTPQUANT in any case. See 7.1.1.31.6. https://bugzilla.gnome.org/show_bug.cgi?id=692270 Signed-off-by: Gwenole Beauchesne --- gst-libs/gst/codecparsers/gstvc1parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c index 557cc06..225a7c0 100644 --- a/gst-libs/gst/codecparsers/gstvc1parser.c +++ b/gst-libs/gst/codecparsers/gstvc1parser.c @@ -659,8 +659,12 @@ parse_vopdquant (GstBitReader * br, GstVC1FrameHdr * framehdr, guint8 dquant) { READ_UINT8 (br, vopdquant->pqdiff, 3); - if (vopdquant->pqdiff == 7) + if (vopdquant->pqdiff != 7) + vopdquant->altpquant = framehdr->pquant + vopdquant->pqdiff + 1; + else { READ_UINT8 (br, vopdquant->abspq, 5); + vopdquant->altpquant = vopdquant->abspq; + } } } } -- 2.7.4