mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-31 13:12:37 +00:00
onvifmetadatacombiner: Drop gap metadata buffers
They won't have a reference timestamp metadata set and are not useful for further processing.
This commit is contained in:
parent
f2893aae0b
commit
1fa39d0ab4
1 changed files with 9 additions and 0 deletions
|
@ -158,6 +158,15 @@ impl OnvifMetadataCombiner {
|
|||
end: gst::ClockTime,
|
||||
) -> Result<bool, gst::FlowError> {
|
||||
while let Some(buffer) = self.meta_sink_pad.peek_buffer() {
|
||||
// Skip over gap buffers
|
||||
if buffer.flags().contains(gst::BufferFlags::GAP)
|
||||
&& buffer.flags().contains(gst::BufferFlags::DROPPABLE)
|
||||
&& buffer.size() == 0
|
||||
{
|
||||
self.meta_sink_pad.pop_buffer().unwrap();
|
||||
continue;
|
||||
}
|
||||
|
||||
let meta_ts = crate::lookup_reference_timestamp(&buffer).ok_or_else(|| {
|
||||
gst::element_error!(
|
||||
element,
|
||||
|
|
Loading…
Reference in a new issue