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

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-12-05 21:29:50 +0300
committerSebastian Dröge <sebastian@centricular.com>2020-12-05 21:29:50 +0300
commit6aed1ed926293786e5daa09f8f24f6050d049b74 (patch)
tree9257074dd7889b1ffcb2ccfda1b505796d4a2696 /video/closedcaption
parent58786fa0b5f122f2ccd60277739fb1450b3a71f7 (diff)
Remove various unneeded unwraps
Diffstat (limited to 'video/closedcaption')
-rw-r--r--video/closedcaption/src/cea608overlay/imp.rs9
-rw-r--r--video/closedcaption/src/cea608tott/imp.rs2
-rw-r--r--video/closedcaption/src/mcc_parse/imp.rs5
-rw-r--r--video/closedcaption/src/scc_parse/imp.rs5
-rw-r--r--video/closedcaption/src/tttocea608/imp.rs2
5 files changed, 8 insertions, 15 deletions
diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs
index 61f6a9899..98459b0b8 100644
--- a/video/closedcaption/src/cea608overlay/imp.rs
+++ b/video/closedcaption/src/cea608overlay/imp.rs
@@ -265,11 +265,10 @@ impl Cea608Overlay {
if let Some(features) = overlay_caps.get_mut_features(0) {
features.add(&gst_video::CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
- if let Some(peercaps) = self.srcpad.peer_query_caps(Some(&caps_clone)) {
- downstream_accepts_meta = !peercaps.is_empty();
- if downstream_accepts_meta {
- caps = caps_clone;
- }
+ let peercaps = self.srcpad.peer_query_caps(Some(&caps_clone));
+ downstream_accepts_meta = !peercaps.is_empty();
+ if downstream_accepts_meta {
+ caps = caps_clone;
}
}
}
diff --git a/video/closedcaption/src/cea608tott/imp.rs b/video/closedcaption/src/cea608tott/imp.rs
index 68aee6c0b..fca410e65 100644
--- a/video/closedcaption/src/cea608tott/imp.rs
+++ b/video/closedcaption/src/cea608tott/imp.rs
@@ -286,7 +286,7 @@ impl Cea608ToTt {
}
let mut downstream_caps = match self.srcpad.get_allowed_caps() {
- None => self.srcpad.get_pad_template_caps().unwrap(),
+ None => self.srcpad.get_pad_template_caps(),
Some(caps) => caps,
};
diff --git a/video/closedcaption/src/mcc_parse/imp.rs b/video/closedcaption/src/mcc_parse/imp.rs
index 945461e89..c26f8b59f 100644
--- a/video/closedcaption/src/mcc_parse/imp.rs
+++ b/video/closedcaption/src/mcc_parse/imp.rs
@@ -62,10 +62,7 @@ impl PullState {
fn new(element: &super::MccParse, pad: &gst::Pad) -> Self {
Self {
need_stream_start: true,
- stream_id: pad
- .create_stream_id(element, Some("src"))
- .unwrap()
- .to_string(),
+ stream_id: pad.create_stream_id(element, Some("src")).to_string(),
offset: 0,
duration: gst::CLOCK_TIME_NONE,
}
diff --git a/video/closedcaption/src/scc_parse/imp.rs b/video/closedcaption/src/scc_parse/imp.rs
index ebe3c08f8..d04d3a162 100644
--- a/video/closedcaption/src/scc_parse/imp.rs
+++ b/video/closedcaption/src/scc_parse/imp.rs
@@ -55,10 +55,7 @@ impl PullState {
fn new(element: &super::SccParse, pad: &gst::Pad) -> Self {
Self {
need_stream_start: true,
- stream_id: pad
- .create_stream_id(element, Some("src"))
- .unwrap()
- .to_string(),
+ stream_id: pad.create_stream_id(element, Some("src")).to_string(),
offset: 0,
duration: gst::CLOCK_TIME_NONE,
}
diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs
index e99e2c0e7..db468e505 100644
--- a/video/closedcaption/src/tttocea608/imp.rs
+++ b/video/closedcaption/src/tttocea608/imp.rs
@@ -679,7 +679,7 @@ impl TtToCea608 {
match event.view() {
EventView::Caps(..) => {
let mut downstream_caps = match self.srcpad.get_allowed_caps() {
- None => self.srcpad.get_pad_template_caps().unwrap(),
+ None => self.srcpad.get_pad_template_caps(),
Some(caps) => caps,
};