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

This commit is contained in:
Sebastian Dröge 2019-05-25 13:02:41 +02:00
parent be9434e029
commit bc082ba56c
2 changed files with 2 additions and 0 deletions

View file

@ -515,6 +515,7 @@ where
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoDecoder = from_glib_borrow(ptr);
gst_video_sys::gst_video_codec_state_ref(state);
let mut wrap_state = VideoCodecState::<Readable>::new(state);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {

View file

@ -469,6 +469,7 @@ where
let instance = &*(ptr as *mut T::Instance);
let imp = instance.get_impl();
let wrap: VideoEncoder = from_glib_borrow(ptr);
gst_video_sys::gst_video_codec_state_ref(state);
let mut wrap_state = VideoCodecState::<Readable>::new(state);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {