diff options
author | Jonas Larsson <jonas@hallerud.se> | 2011-11-29 12:21:32 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-11-29 12:21:32 +0100 |
commit | 9c4b926c41544c3b72c3636f4d51cc280bec2029 (patch) | |
tree | bddc3983ae85618afdf00b0f23f86b641e1b15a0 /omx/gstomxh264enc.c | |
parent | 458199abfbc29ca986dcdbaa74694b917522573c (diff) | |
download | gst-omx-9c4b926c41544c3b72c3636f4d51cc280bec2029.tar.gz |
omxh264enc: Add support for resending headers after a forced-keyframe
Diffstat (limited to 'omx/gstomxh264enc.c')
-rw-r--r-- | omx/gstomxh264enc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/omx/gstomxh264enc.c b/omx/gstomxh264enc.c index af1ad6c..95e8f2e 100644 --- a/omx/gstomxh264enc.c +++ b/omx/gstomxh264enc.c @@ -341,7 +341,17 @@ gst_omx_h264_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port, if (buf->omx_buf->nFilledLen >= 4 && GST_READ_UINT32_BE (buf->omx_buf->pBuffer + buf->omx_buf->nOffset) == 0x00000001) { + GstBuffer *hdrs; + + GST_DEBUG_OBJECT (self, "got codecconfig in byte-stream format"); buf->omx_buf->nFlags &= ~OMX_BUFFERFLAG_CODECCONFIG; + + hdrs = gst_buffer_new_and_alloc (buf->omx_buf->nFilledLen); + memcpy (GST_BUFFER_DATA (hdrs), + buf->omx_buf->pBuffer + buf->omx_buf->nOffset, + buf->omx_buf->nFilledLen); + gst_base_video_encoder_set_headers (GST_BASE_VIDEO_ENCODER (self), hdrs); + gst_buffer_unref (hdrs); } } |