summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-15 09:32:42 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-15 09:51:34 +0100
commitc59d8930ac1dc4a0480d6e3ba2b88cd5affe1c7c (patch)
tree4f5601a5fed19483f2f53b0f069ba285a0436270
parenta5223c3ebbf39e78fb79cac16c35222316c8b09c (diff)
downloadgst-omx-c59d8930ac1dc4a0480d6e3ba2b88cd5affe1c7c.tar.gz
omxvideodec: Give the codec_data the timestamp of the first frame and no duration
-rw-r--r--omx/gstomxvideodec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index b26c657..d4ce85a 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -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);