diff options
author | don.darling <don.darling@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2010-11-16 20:47:47 +0000 |
---|---|---|
committer | don.darling <don.darling@24075187-2e39-4e88-bbb8-bc8aa768f540> | 2010-11-16 20:47:47 +0000 |
commit | c773f0c60a8baa47dca087dcd30a7134d895ecfe (patch) | |
tree | 4508f3e037de49669607f2efa2865529099b2c6f | |
parent | 3b7c780c16e73269bb0890d3a2bdc67104a57af5 (diff) |
TIVidenc1: Copy encoded output to a regular GstBuffer
Previously the CMEM-allocated buffers that hold the encoded output were passed
directly downstream. However, there are only a few of these buffers, so
waiting for one to become available is often more expensive than doing a memcpy
of the encoded frame (which is usually pretty small).
This change copies the encoded data out of the CMEM buffer and passes it
downstream.
git-svn-id: https://gstreamer.ti.com/svn/gstreamer_ti/trunk@876 24075187-2e39-4e88-bbb8-bc8aa768f540
-rw-r--r-- | gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c index 5276fb0..639d368 100644 --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c @@ -1468,8 +1468,8 @@ gst_tividenc1_encode(GstTIVidenc1 *videnc1, GstBuffer *inBuf, * buffer for re-use in this element when the source pad calls * gst_buffer_unref(). */ - *outBuf = gst_tidmaibuffertransport_new(hDstBuf, videnc1->hOutBufTab); - gst_buffer_set_data(*outBuf, GST_BUFFER_DATA(*outBuf), + *outBuf = gst_buffer_new_and_alloc(Buffer_getNumBytesUsed(hDstBuf)); + memcpy(GST_BUFFER_DATA(*outBuf), Buffer_getUserPtr(hDstBuf), Buffer_getNumBytesUsed(hDstBuf)); gst_buffer_set_caps(*outBuf, GST_PAD_CAPS(videnc1->srcpad)); |