mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
omxvideoenc: Set nTickCount to the whole duration of the buffer instead of a wrong calculation
This commit is contained in:
parent
cef3fb5fc3
commit
bc2990169a
1 changed files with 3 additions and 2 deletions
|
@ -1501,9 +1501,10 @@ gst_omx_video_enc_handle_frame (GstVideoEncoder * encoder,
|
||||||
duration = frame->duration;
|
duration = frame->duration;
|
||||||
if (duration != GST_CLOCK_TIME_NONE) {
|
if (duration != GST_CLOCK_TIME_NONE) {
|
||||||
buf->omx_buf->nTickCount =
|
buf->omx_buf->nTickCount =
|
||||||
gst_util_uint64_scale (buf->omx_buf->nFilledLen, duration,
|
gst_util_uint64_scale (duration, OMX_TICKS_PER_SECOND, GST_SECOND);
|
||||||
gst_buffer_get_size (frame->input_buffer));
|
|
||||||
self->last_upstream_ts += duration;
|
self->last_upstream_ts += duration;
|
||||||
|
} else {
|
||||||
|
buf->omx_buf->nTickCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
self->started = TRUE;
|
self->started = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue