fmp4mux: examples: Avoid unnecessary caps copies

This commit is contained in:
Sebastian Dröge 2022-11-22 10:39:47 +02:00
parent 45fa946e8b
commit 1fcbc346bc
2 changed files with 2 additions and 2 deletions

View file

@ -368,7 +368,7 @@ fn probe_encoder(state: Arc<Mutex<State>>, enc: gst::Element) {
move |_pad, info| match info.data {
Some(gst::PadProbeData::Event(ref ev)) => match ev.view() {
gst::EventView::Caps(e) => {
let mime = gst_pbutils::codec_utils_caps_get_mime_codec(&e.caps().to_owned());
let mime = gst_pbutils::codec_utils_caps_get_mime_codec(e.caps());
let mut state = state.lock().unwrap();
state.all_mimes.push(mime.unwrap().into());

View file

@ -263,7 +263,7 @@ fn probe_encoder(state: Arc<Mutex<State>>, enc: gst::Element) {
move |_pad, info| match info.data {
Some(gst::PadProbeData::Event(ref ev)) => match ev.view() {
gst::EventView::Caps(e) => {
let mime = gst_pbutils::codec_utils_caps_get_mime_codec(&e.caps().to_owned());
let mime = gst_pbutils::codec_utils_caps_get_mime_codec(e.caps());
let mut state = state.lock().unwrap();
state.all_mimes.push(mime.unwrap().into());