diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-05-10 22:47:21 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-05-10 22:47:21 +0200 |
commit | bc2990169a8d7ed3df5ae626c8629ad0ed0d5188 (patch) | |
tree | 980756e6fd9aae00bc0f033831b20d83c3ef8dac | |
parent | cef3fb5fc3b5729d06e7505d68d803d19bcc1bf7 (diff) |
omxvideoenc: Set nTickCount to the whole duration of the buffer instead of a wrong calculation
-rw-r--r-- | omx/gstomxvideoenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index d1bd3fc..4014421 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -1501,9 +1501,10 @@ gst_omx_video_enc_handle_frame (GstVideoEncoder * encoder, duration = frame->duration; if (duration != GST_CLOCK_TIME_NONE) { buf->omx_buf->nTickCount = - gst_util_uint64_scale (buf->omx_buf->nFilledLen, duration, - gst_buffer_get_size (frame->input_buffer)); + gst_util_uint64_scale (duration, OMX_TICKS_PER_SECOND, GST_SECOND); self->last_upstream_ts += duration; + } else { + buf->omx_buf->nTickCount = 0; } self->started = TRUE; |