video play fast with gst new buffer allocation

anil0407 anilkumar03006 at
Mon Mar 1 05:39:56 UTC 2021


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:

More information about the gstreamer-devel mailing list