video play fast with gst new buffer allocation
anil0407
anilkumar03006 at hotmail.com
Mon Mar 1 05:39:56 UTC 2021
Hi,
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 *) map.data;
memcpy((guint16 *)n_map.data, (guint16 *)ptr, buf_size);
gst_buffer_unmap (buf, &map);
gst_buffer_unmap (n_buf, &n_map);
return gst_pad_push (filter->srcpad, n_buf);
}
Thanks,
Anil
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list