diff --git a/src/codec/id.rs b/src/codec/id.rs index aed11b53..3af30e1b 100644 --- a/src/codec/id.rs +++ b/src/codec/id.rs @@ -1,4 +1,5 @@ use std::ffi::CStr; +use std::fmt; use std::str::from_utf8_unchecked; use ffi::AVCodecID::*; @@ -1941,3 +1942,9 @@ impl From for AVCodecID { } } } + +impl fmt::Display for Id { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { + write!(f, "{}", self.name()) + } +}