player: fix clippy error

This commit is contained in:
Stéphane Cerveau 2022-03-07 11:07:18 +01:00
parent ac06bae594
commit 1fe43d7da3

View file

@ -106,13 +106,13 @@ impl Player {
}
// Create pipeline from the description
let pipeline = gst::parse_launch(&description.to_string())?;
let pipeline = gst::parse_launch(description)?;
let pipeline = pipeline.downcast::<gst::Pipeline>();
/* start playing */
if pipeline.is_err() {
GPS_ERROR!("Can not create a proper pipeline from gstreamer parse_launch");
return Err(anyhow::anyhow!(
"Unable to create a pipeline from the given parse launch {"
"Unable to create a pipeline from the given parse launch"
));
}
self.check_for_gtk4sink(pipeline.as_ref().unwrap());