Fwd: avdec_h264 can't decide on src caps

Klaas Jan Russcher kjrusscher at gmail.com
Fri Oct 30 04:15:42 PDT 2015


The problem was indeed that the encoder did not receive any data. I set
property "disable-passthrough" of the h264parse to true and then is showed
for each pushed buffer "received invalid RTP payload".

I had no idea what I was doing wrong. Then I saw that GstBuffer has a
function gst_buffer_memcmp(). In the following code I compared 'buffer' to
'data'. To my surprise 'buffer' and 'data' weren't the same.
*Code (not working):*

* GstBuffer *buffer = video.PullBuffer();*
* bufferSize = gst_buffer_get_size( buffer );*
* unsigned char *data = new unsigned char[bufferSize];*
* memcpy( data, buffer, bufferSize );*

Then I replaced memcpy with gst_buffer_extract(). gst_buffer_memcmp() shown
now that 'buffer' is the same as 'data'.
*Code (working):*

* GstBuffer *buffer = video.PullBuffer();*
* bufferSize = gst_buffer_get_size( buffer );*
* unsigned char *data = new unsigned char[bufferSize];*
* gst_buffer_extract( buffer, 0, data, bufferSize );*

Is there anybody who can tell me what the difference is between memcpy and
gst_buffer_extract? To my knowledge they do exactly the same, but
apparently gst_buffer_extract does something different/extra.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151030/ee7870d7/attachment.html>


More information about the gstreamer-devel mailing list