vtenc: Properly scale timestamps for the API and set invalid values

This commit is contained in:
Sebastian Dröge 2014-09-17 14:55:24 +03:00
parent e4563ce6cf
commit b93e0f5f99

View file

@ -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) {