• François Laignel's avatar
    Fix memory issue building a `Sample` with an `info` `Structure` · f4d57a66
    François Laignel authored
    The following code in a `[test]`:
    ``` rust
    let info = Structure::builder("sample.info")
        .field("f3", &123i32)
        .build();
    let sample = Sample::new::<GenericFormattedValue>(
            None,
            None,
            None,
            Some(info.as_ref())
        );
    ```
    
    generates one of the followings executing `cargo test`:
    ```
    - segmentation fault
    - signal: 6, SIGABRT: process abort signal
    - signal: 11, SIGSEGV: invalid memory reference
    ```
    
    This is due to `ffi::gst_sample_new` expecting to take ownership of the `info`
    `Structure`.
    f4d57a66
Name
Last commit
Last update
docs Loading commit data...
examples Loading commit data...
gir-files Loading commit data...
gstreamer Loading commit data...
gstreamer-app Loading commit data...
gstreamer-audio Loading commit data...
gstreamer-base Loading commit data...
gstreamer-net Loading commit data...
gstreamer-pbutils Loading commit data...
gstreamer-player Loading commit data...
gstreamer-rtsp Loading commit data...
gstreamer-rtsp-server Loading commit data...
gstreamer-sdp Loading commit data...
gstreamer-video Loading commit data...
gstreamer-webrtc Loading commit data...
tutorials Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
Cargo.toml Loading commit data...
Gir_Gst.toml Loading commit data...
Gir_GstApp.toml Loading commit data...
Gir_GstAudio.toml Loading commit data...
Gir_GstBase.toml Loading commit data...
Gir_GstNet.toml Loading commit data...
Gir_GstPbutils.toml Loading commit data...
Gir_GstPlayer.toml Loading commit data...
Gir_GstRtsp.toml Loading commit data...
Gir_GstRtspServer.toml Loading commit data...
Gir_GstSdp.toml Loading commit data...
Gir_GstVideo.toml Loading commit data...
Gir_GstWebRTC.toml Loading commit data...
LICENSE-APACHE Loading commit data...
LICENSE-MIT Loading commit data...
README.md Loading commit data...