mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-12 19:14:16 +00:00
vtenc: Properly scale timestamps for the API and set invalid values
This commit is contained in:
parent
e4563ce6cf
commit
b93e0f5f99
1 changed files with 5 additions and 2 deletions
|
@ -639,8 +639,11 @@ gst_vtenc_encode_frame (GstVTEnc * self, GstVideoCodecFrame * frame)
|
|||
GST_OBJECT_UNLOCK (self);
|
||||
}
|
||||
|
||||
ts = CMTimeMake (GST_TIME_AS_MSECONDS (frame->pts), 1000);
|
||||
duration = CMTimeMake (GST_TIME_AS_MSECONDS (frame->duration), 1000);
|
||||
ts = CMTimeMake (frame->pts, GST_SECOND);
|
||||
if (frame->duration != GST_CLOCK_TIME_NONE)
|
||||
duration = CMTimeMake (frame->duration, GST_SECOND);
|
||||
else
|
||||
duration = kCMTimeInvalid;
|
||||
|
||||
meta = gst_buffer_get_core_media_meta (frame->input_buffer);
|
||||
if (meta != NULL) {
|
||||
|
|
Loading…
Reference in a new issue