buffer: fix meta sequence number fallback on rpi
authorTim-Philipp Müller <tim@centricular.com>
Tue, 14 Jul 2020 11:11:57 +0000 (12:11 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 22 Jul 2020 12:19:59 +0000 (12:19 +0000)
The global seqnum variable wasn't actually increased in
the fallback code path, leading to all buffers getting
a seqnum of 0. Which also made the unit test fail.

This affects platforms/toolchains that don't have
64-bit atomic ops such as when compiling for armv7 rpi.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/565>

gst/gstbuffer.c

index d0b6ee7..62a4d3e 100644 (file)
@@ -192,7 +192,7 @@ gst_atomic_int64_inc (volatile gint64 * atomic)
   gint64 ret;
 
   G_LOCK (meta_seq);
-  ret = *atomic++;
+  ret = (*atomic)++;
   G_UNLOCK (meta_seq);
 
   return ret;