Commit bc082ba5 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

video: Don't unref video codec state in set_format()

parent be9434e0
Pipeline #38670 passed with stages
in 8 minutes and 6 seconds
...@@ -515,6 +515,7 @@ where ...@@ -515,6 +515,7 @@ where
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl(); let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr); let wrap: VideoDecoder = from_glib_borrow(ptr);
gst_video_sys::gst_video_codec_state_ref(state);
let mut wrap_state = VideoCodecState::<Readable>::new(state); let mut wrap_state = VideoCodecState::<Readable>::new(state);
gst_panic_to_error!(&wrap, &instance.panicked(), false, { gst_panic_to_error!(&wrap, &instance.panicked(), false, {
......
...@@ -469,6 +469,7 @@ where ...@@ -469,6 +469,7 @@ where
let instance = &*(ptr as *mut T::Instance); let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl(); let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr); let wrap: VideoEncoder = from_glib_borrow(ptr);
gst_video_sys::gst_video_codec_state_ref(state);
let mut wrap_state = VideoCodecState::<Readable>::new(state); let mut wrap_state = VideoCodecState::<Readable>::new(state);
gst_panic_to_error!(&wrap, &instance.panicked(), false, { gst_panic_to_error!(&wrap, &instance.panicked(), false, {
......
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