From 9eb0f8501fbca12a38713f1f9934b1f806bef236 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Thu, 13 Jan 2022 10:11:52 +0800 Subject: [PATCH] codecparsers: h265parser: Fix the index incrementation error in append_profile(). The current "*idx++" operation just refers the pointer and increment the pointer itself, not the content of the pointer. This causes that the count of the profiles is always 0. Part-of: --- .../gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c index 0c1b0ed5e4..d351a397e1 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c @@ -3643,7 +3643,8 @@ append_profile (GstH265Profile profiles[GST_H265_PROFILE_MAX], guint * idx, { if (profile == GST_H265_PROFILE_INVALID) return; - profiles[*idx++] = profile; + profiles[*idx] = profile; + (*idx)++; } /* *INDENT-OFF* */