codecparsers: h265parser: Fix the index incrementation error in append_profile().
authorHe Junyan <junyan.he@intel.com>
Thu, 13 Jan 2022 02:11:52 +0000 (10:11 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 13 Jan 2022 05:28:17 +0000 (05:28 +0000)
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1517>

subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c

index 0c1b0ed..d351a39 100644 (file)
@@ -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* */