meh / rust-ffmpeg

Safe FFmpeg wrapper.
Do What The F*ck You Want To Public License
459 stars 97 forks source link

Seek for stable #168

Open PunitLodha opened 2 years ago

PunitLodha commented 2 years ago

Currently, on stable, seek doesn't work correctly For seek implementation, https://github.com/meh/rust-ffmpeg/blob/master/src/format/io.rs#L93-L105, stream_len() is being used which is nightly only and 0 is returned in stable. According to, https://github.com/rust-lang/rust/issues/59359 and https://github.com/rust-lang/rust/pull/58422, stream_len() is a convenience feature added for improved readability, which can be implemented manually by 3 seeks.

On stable, I think it would be better to manually implement using 3 seeks rather than, returning 0 which does not allow for a seek