diff options
author | François Laignel <francois@centricular.com> | 2023-11-13 21:26:17 +0300 |
---|---|---|
committer | François Laignel <francois@centricular.com> | 2023-11-13 21:26:23 +0300 |
commit | 9250c592a7408cd25a65ca916745d953f396af03 (patch) | |
tree | bf7684aac0488647d2c33fe4f2cf8fcf6c412817 /net | |
parent | 636c76b03bc82a63218f68fb1d650d80c5899fed (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ndi/src/ndisrcdemux/imp.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ndi/src/ndisrcdemux/imp.rs b/net/ndi/src/ndisrcdemux/imp.rs index be93e4c8..c9a51956 100644 --- a/net/ndi/src/ndisrcdemux/imp.rs +++ b/net/ndi/src/ndisrcdemux/imp.rs @@ -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); } }; |