Commit af65497c authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐

video: fix VideoFormat Display implementation

We were calling the blanket implementation of ToString, which is using
Display, rather than our own, resulting in an infinite recursion.

Fix #208
parent 856a5a25
......@@ -116,6 +116,18 @@ impl str::FromStr for ::VideoFormat {
impl fmt::Display for ::VideoFormat {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
f.write_str(self.to_string().as_str())
f.write_str(::VideoFormat::to_string(*self))
}
}
#[cfg(test)]
mod tests {
use gst;
#[test]
fn test_display() {
gst::init().unwrap();
format!("{}", ::VideoFormat::Nv16);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment