rtpmparobustdepay: modify buffer data rather than buffer itself
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 26 Jul 2012 14:34:21 +0000 (16:34 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 26 Jul 2012 14:34:52 +0000 (16:34 +0200)
gst/rtp/gstrtpmparobustdepay.c

index cac96da..b2f2aa1 100644 (file)
@@ -444,9 +444,11 @@ gst_rtp_mpa_robust_depay_deinterleave (GstRtpMPARobustDepay * rtpmpadepay,
       }
     }
     /* rewrite buffer sync header */
-    val = GST_READ_UINT16_BE (buf);
+    gst_buffer_map (buf, &map, GST_MAP_READWRITE);
+    val = GST_READ_UINT16_BE (map.data);
     val = (0x7ff << 5) | val;
-    GST_WRITE_UINT16_BE (buf, val);
+    GST_WRITE_UINT16_BE (map.data, val);
+    gst_buffer_unmap (buf, &map);
     /* store and keep track of last indices */
     rtpmpadepay->last_icc = icc;
     rtpmpadepay->last_ii = iindex;