From 17e8fea158b8bb38e5428aecc72a1d7ecff12df7 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Wed, 30 Jun 2021 15:23:15 +0800 Subject: [PATCH] codecparsers: vp9statefulparser: Fix the gst_vp9_get_qindex clamp issue. The alternate quantizer is a delta value and should be int type. We mark it wrongly as uint, that will make CLAMP (data, 0, 255) always choose 255 rather than 0 if the data < 0. Part-of: --- gst-libs/gst/codecs/gstvp9statefulparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/codecs/gstvp9statefulparser.c b/gst-libs/gst/codecs/gstvp9statefulparser.c index 2c25419b56..134e1045aa 100644 --- a/gst-libs/gst/codecs/gstvp9statefulparser.c +++ b/gst-libs/gst/codecs/gstvp9statefulparser.c @@ -1137,7 +1137,7 @@ gst_vp9_get_qindex (const GstVp9SegmentationParams * segmentation_params, if (gst_vp9_seg_feature_active (segmentation_params, segment_id, GST_VP9_SEG_LVL_ALT_Q)) { - guint data = + gint data = segmentation_params->feature_data[segment_id][GST_VP9_SEG_LVL_ALT_Q]; if (!segmentation_params->segmentation_abs_or_delta_update)