fix for #150242
authorThomas Vander Stichele <thomas@apestaart.org>
Mon, 16 Aug 2004 10:35:36 +0000 (10:35 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Mon, 16 Aug 2004 10:35:36 +0000 (10:35 +0000)
Original commit message from CVS:
fix for #150242

ChangeLog
gst/gstbuffer.c
gst/gstindex.h
libs/gst/dataprotocol/dataprotocol.c

index c3f1339..d13bf79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-08-16  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       patch by: Wim Taymans (wim@fluendo.com)
+
+       * gst/gstbuffer.c:
+       * gst/gstindex.h:
+       * libs/gst/dataprotocol/dataprotocol.c:
+         copy KEY_UNIT and DELTA_UNIT flags correctly.  Fixes #150242
+
 2004-08-13  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * Makefile.am:
index 97445f9..80ca7e1 100644 (file)
@@ -149,7 +149,8 @@ gst_buffer_default_copy (GstBuffer * buffer)
 
   /* copy relevant flags */
   flags = GST_DATA_FLAG_SHIFT (GST_BUFFER_KEY_UNIT) |
-      GST_DATA_FLAG_SHIFT (GST_BUFFER_IN_CAPS);
+      GST_DATA_FLAG_SHIFT (GST_BUFFER_IN_CAPS) |
+      GST_DATA_FLAG_SHIFT (GST_BUFFER_DELTA_UNIT);
   flags = GST_BUFFER_FLAGS (buffer) & flags;
 
   _GST_DATA_INIT (GST_DATA (copy),
index b24a93e..a22f787 100644 (file)
@@ -78,6 +78,7 @@ struct _GstIndexAssociation {
 typedef enum {
   GST_ASSOCIATION_FLAG_NONE    = 0,
   GST_ASSOCIATION_FLAG_KEY_UNIT = (1 << 0),
+  GST_ASSOCIATION_FLAG_DELTA_UNIT = (1 << 1),
 
   /* new flags should start here */
   GST_ASSOCIATION_FLAG_LAST    = (1 << 8)
index a1aa067..8df6fc0 100644 (file)
@@ -186,9 +186,10 @@ gst_dp_header_from_buffer (const GstBuffer * buffer, GstDPHeaderFlag flags,
   GST_WRITE_UINT64_BE (h + 32, GST_BUFFER_OFFSET_END (buffer));
 
   /* data flags */
-  /* we only copy KEY_UNIT and IN_CAPS flags */
+  /* we only copy KEY_UNIT,DELTA_UNIT and IN_CAPS flags */
   flags_mask = GST_DATA_FLAG_SHIFT (GST_BUFFER_KEY_UNIT) |
-      GST_DATA_FLAG_SHIFT (GST_BUFFER_IN_CAPS);
+      GST_DATA_FLAG_SHIFT (GST_BUFFER_IN_CAPS) |
+      GST_DATA_FLAG_SHIFT (GST_BUFFER_DELTA_UNIT);
 
   GST_WRITE_UINT16_BE (h + 40, GST_BUFFER_FLAGS (buffer) & flags_mask);