mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-28 04:50:30 +00:00
ndi: don't accumulate meta with audio only streams
Currently, only closed caption metadata are supported. When the next video frame is received, pending meta are dequeued and parsed. If close captions are found, they are attached to the video frame. For audio only streams, it doesn't make sense to enqueue metadata. They would accumulate in `pending_metadata` and would never be dequeued. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/460 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1392>
This commit is contained in:
parent
636c76b03b
commit
9250c592a7
1 changed files with 5 additions and 1 deletions
|
@ -534,7 +534,11 @@ impl NdiSrcDemux {
|
|||
gst::log!(CAT, imp: self, "Produced video buffer {:?}", buffer);
|
||||
}
|
||||
Buffer::Metadata { frame, .. } => {
|
||||
state.pending_metadata.push(frame);
|
||||
// Only closed caption meta are supported,
|
||||
// once parsed, they will be attached to the next video buffer
|
||||
if state.video_info.is_some() {
|
||||
state.pending_metadata.push(frame);
|
||||
}
|
||||
return Ok(gst::FlowSuccess::Ok);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue