mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 23:11:01 +00:00
Always free video frames with NDIlib_recv_free_video_v2() after last use
And not potentially before or not at all.
This commit is contained in:
parent
7b8070c55d
commit
b41d5839d4
1 changed files with 1 additions and 1 deletions
|
@ -476,7 +476,6 @@ impl BaseSrcImpl for NdiVideoSrc {
|
|||
}
|
||||
|
||||
if time >= (video_frame.timestamp as u64) {
|
||||
NDIlib_recv_free_video_v2(pNDI_recv, &video_frame);
|
||||
gst_debug!(self.cat, obj: element, "Frame timestamp ({:?}) is lower than received in the first frame from NDI ({:?}), so skiping...", (video_frame.timestamp as u64), time);
|
||||
} else {
|
||||
skip_frame = false;
|
||||
|
@ -526,6 +525,7 @@ impl BaseSrcImpl for NdiVideoSrc {
|
|||
}
|
||||
|
||||
gst_log!(self.cat, obj: element, "Produced buffer {:?}", buffer);
|
||||
NDIlib_recv_free_video_v2(pNDI_recv, &video_frame);
|
||||
|
||||
Ok(buffer)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue