mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
omxh264enc: Add support for resending headers after a forced-keyframe
This commit is contained in:
parent
458199abfb
commit
9c4b926c41
1 changed files with 10 additions and 0 deletions
|
@ -341,7 +341,17 @@ gst_omx_h264_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
|
||||||
if (buf->omx_buf->nFilledLen >= 4 &&
|
if (buf->omx_buf->nFilledLen >= 4 &&
|
||||||
GST_READ_UINT32_BE (buf->omx_buf->pBuffer +
|
GST_READ_UINT32_BE (buf->omx_buf->pBuffer +
|
||||||
buf->omx_buf->nOffset) == 0x00000001) {
|
buf->omx_buf->nOffset) == 0x00000001) {
|
||||||
|
GstBuffer *hdrs;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (self, "got codecconfig in byte-stream format");
|
||||||
buf->omx_buf->nFlags &= ~OMX_BUFFERFLAG_CODECCONFIG;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue