summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2015-07-08 12:00:56 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-07-08 13:33:37 +0300
commitea8cabe084e9f287ebe808c16ba4761c086391c6 (patch)
tree153ce8625f3372913fcc7738e0be04e822b76846
parent0728b219b92d2daa704756e89a6bc3966c69c8ab (diff)
baseparse: put buffer in a correct state after gst_adapter_get_buffer call
We must make the buffer writable to write its PTS and DTS, and also reset its duration. The behaviour is now the same as before commit c3bcbadd, except metas might still be attached to the buffer extracted from the adapter. https://bugzilla.gnome.org/show_bug.cgi?id=752092
-rw-r--r--libs/gst/base/gstbaseparse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index a43d29343..f42389af1 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -3016,8 +3016,10 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
/* already inform subclass what timestamps we have planned,
* at least if provided by time-based upstream */
if (parse->priv->upstream_format == GST_FORMAT_TIME) {
+ tmpbuf = gst_buffer_make_writable (tmpbuf);
GST_BUFFER_PTS (tmpbuf) = parse->priv->next_pts;
GST_BUFFER_DTS (tmpbuf) = parse->priv->next_dts;
+ GST_BUFFER_DURATION (tmpbuf) = GST_CLOCK_TIME_NONE;
}
/* keep the adapter mapped, so keep track of what has to be flushed */