You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please include as much info as possible to save me (solo maintainer helping for free) some time. A minimal, complete, and reproducible example is a must. Link to a gist if you don't feel like posting all the code inline. At the same time, please leave out unnecessary code so I don't need to wade through a hundred lines to get to the problematic part. Tell me your OS, FFmpeg version, etc. if there's even a slim chance of relevancy.
letmut i = ffmpeg_next::format::input(&"video.mp4").unwrap();letmut i2 = ffmpeg_next::format::input(&"video.mp4").unwrap();
std::mem::swap(&mut*i,&mut*i2);drop(i2);println!("still alive");println!("{}", i.format().name())
still alive
thread 'main' panicked at /home/troy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-next-6.1.0/src/format/format/input.rs:26:53:
misaligned pointer dereference: address must be a multiple of 0x8 but is 0x75e8a3e2869450e7
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
[1] 190166 IOT instruction (core dumped) cargo run
I suppose the only way to fix this is to not use deref mut and just expose the methods via impl using deref mut allows users to swap the inner values and can cause strange issues. Obviously people SHOULD not be doing this but they can.
Not sure what to think / do about this.
The text was updated successfully, but these errors were encountered:
Please include as much info as possible to save me (solo maintainer helping for free) some time. A minimal, complete, and reproducible example is a must. Link to a gist if you don't feel like posting all the code inline. At the same time, please leave out unnecessary code so I don't need to wade through a hundred lines to get to the problematic part. Tell me your OS, FFmpeg version, etc. if there's even a slim chance of relevancy.
I suppose the only way to fix this is to not use deref mut and just expose the methods via
impl
using deref mut allows users to swap the inner values and can cause strange issues. Obviously people SHOULD not be doing this but they can.Not sure what to think / do about this.
The text was updated successfully, but these errors were encountered: