mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-04 09:42:19 +00:00
vtenc: Check if VTSessionCopyProperty() succeeds before using the result
https://bugzilla.gnome.org/show_bug.cgi?id=744585
This commit is contained in:
parent
282dbcee0b
commit
0c9f35653f
1 changed files with 5 additions and 0 deletions
|
@ -1014,6 +1014,11 @@ gst_vtenc_update_latency (GstVTEnc * self)
|
|||
|
||||
status = VTSessionCopyProperty (self->session,
|
||||
kVTCompressionPropertyKey_NumberOfPendingFrames, NULL, &value);
|
||||
if (status != noErr || !value) {
|
||||
GST_INFO_OBJECT (self, "failed to get NumberOfPendingFrames: %d", status);
|
||||
return;
|
||||
}
|
||||
|
||||
CFNumberGetValue (value, kCFNumberSInt32Type, &frames);
|
||||
if (self->latency_frames == -1 || self->latency_frames != frames) {
|
||||
self->latency_frames = frames;
|
||||
|
|
Loading…
Reference in a new issue