AW: video play fast with gst new buffer allocation

Thornton, Keith keith.thornton at
Mon Mar 1 13:18:17 UTC 2021

your new buffer is missing PTS, DURATION and OFFSET stuff. You should set these with the values from the original buffer

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel <gstreamer-devel-bounces at> Im Auftrag von anil0407
Gesendet: Montag, 1. März 2021 06:40
An: gstreamer-devel at
Betreff: video play fast with gst new buffer allocation


In a _chain function(custom plugin), when i move to the existing gst buffer to new gst buffer, i observed that the video is playing very fast.
what changes required to make it play normal speed.
Here the snippet code:
        buf = gst_buffer_make_writable (buf);
	buf_size = gst_buffer_get_size (buf);
	n_buf = gst_buffer_new_allocate (NULL, buf_size, NULL);
	gst_buffer_map (n_buf, &n_map, GST_MAP_WRITE);

	if (gst_buffer_map (buf, &map, GST_MAP_WRITE)) {
		ptr = (guint16 *);
		memcpy((guint16 *), (guint16 *)ptr, buf_size);
		gst_buffer_unmap (buf, &map);
		gst_buffer_unmap (n_buf, &n_map);
		return gst_pad_push (filter->srcpad, n_buf);


Sent from:
gstreamer-devel mailing list
gstreamer-devel at

More information about the gstreamer-devel mailing list