mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
omxvideodec: Give the codec_data the timestamp of the first frame and no duration
This commit is contained in:
parent
a5223c3ebb
commit
c59d8930ac
1 changed files with 7 additions and 0 deletions
|
@ -2320,6 +2320,13 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
|
|||
buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
|
||||
buf->omx_buf->nFilledLen);
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||
buf->omx_buf->nTimeStamp =
|
||||
gst_util_uint64_scale (timestamp, OMX_TICKS_PER_SECOND, GST_SECOND);
|
||||
else
|
||||
buf->omx_buf->nTimeStamp = 0;
|
||||
buf->omx_buf->nTickCount = 0;
|
||||
|
||||
self->started = TRUE;
|
||||
err = gst_omx_port_release_buffer (port, buf);
|
||||
gst_buffer_replace (&self->codec_data, NULL);
|
||||
|
|
Loading…
Reference in a new issue