How to disable sync in parser h265parse element..weird issue
devil coder
mdamirraza at gmail.com
Wed Nov 21 07:13:20 UTC 2018
Hi all ,
I found the issue..my Nvidia SDK encoder gives a vector output but i was not
allocating memory properly ..
*ERROR*
vTempPacket = pEncoder->EncodeVideo();
buffer = gst_buffer_new_allocate(NULL,
packet.size(), NULL);
gst_buffer_map(buffer, &map, GST_MAP_WRITE);
map.size = packet.size();
memcpy(map.data, packet.data(), packet.size());
g_signal_emit_by_name(pstCallBackControl->pstGstConfig->AppSrc,
"push-buffer",
buffer, &ret);
gst_buffer_unmap(buffer, &map);
gst_buffer_unref(buffer);
*Fix :*
vTempPacket = pEncoder->EncodeVideo();
for (std::vector<uint8_t> &packet : vTempPacket)
{
buffer = gst_buffer_new_allocate(NULL, packet.size(), NULL);
gst_buffer_map(buffer, &map, GST_MAP_WRITE);
map.size = packet.size();
memcpy(map.data, packet.data(), packet.size());
g_signal_emit_by_name(pstCallBackControl->pstGstConfig->AppSrc,
"push-buffer",
buffer, &ret);
gst_buffer_unmap(buffer, &map);
gst_buffer_unref(buffer);
}
-----
adi
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list