Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorFrançois Laignel <francois@centricular.com>2023-11-13 21:26:17 +0300
committerFrançois Laignel <francois@centricular.com>2023-11-13 21:26:23 +0300
commit9250c592a7408cd25a65ca916745d953f396af03 (patch)
treebf7684aac0488647d2c33fe4f2cf8fcf6c412817 /net
parent636c76b03bc82a63218f68fb1d650d80c5899fed (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.rs6
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);
}
};