mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-24 20:41:00 +00:00
onvif: Use CustomMeta::is_registered function
Use CustomMeta::is_registered() to avoid registering twice OnvifXMLFrameMeta type. It will be useful later when adding relation meta elements. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1464>
This commit is contained in:
parent
4abc5c7a48
commit
eddf443a8b
1 changed files with 3 additions and 1 deletions
|
@ -120,7 +120,9 @@ fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
|||
onvifmetadataoverlay::register(plugin)?;
|
||||
onvifmetadataparse::register(plugin)?;
|
||||
|
||||
gst::meta::CustomMeta::register("OnvifXMLFrameMeta", &[]);
|
||||
if !gst::meta::CustomMeta::is_registered("OnvifXMLFrameMeta") {
|
||||
gst::meta::CustomMeta::register("OnvifXMLFrameMeta", &[]);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue