summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-05-12 08:56:15 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-05-12 08:56:15 +0200
commit527af797d2a3336be60a76bc8d525ba77396010e (patch)
treefdf7eddede34bcad23a6e331a1f1aa860ba0d646
parent14af0f266e2b686a61519907b4832ac4c4187073 (diff)
omxaudioenc: Correctly scale nTickCount by OMX_TICKS_PER_SECOND
-rw-r--r--omx/gstomxaudioenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/omx/gstomxaudioenc.c b/omx/gstomxaudioenc.c
index b27bd33..0eda996 100644
--- a/omx/gstomxaudioenc.c
+++ b/omx/gstomxaudioenc.c
@@ -1007,6 +1007,9 @@ gst_omx_audio_enc_handle_frame (GstAudioEncoder * encoder, GstBuffer * inbuf)
if (duration != GST_CLOCK_TIME_NONE) {
buf->omx_buf->nTickCount =
gst_util_uint64_scale (buf->omx_buf->nFilledLen, duration, size);
+ buf->omx_buf->nTickCount =
+ gst_util_uint64_scale (buf->omx_buf->nTickCount,
+ OMX_TICKS_PER_SECOND, GST_SECOND);
self->last_upstream_ts += duration;
}