Open xinghun92 opened 6 years ago
Same ptr::is_null()
=> !ptr::is_null()
should be applied for the resampling part too:
https://github.com/meh/rust-ffmpeg/blob/0bcd4550b85580d02599d84b312251d930d1802f/src/software/resampling/context.rs#L58
These is_null
checks were fixed in dc6ace91ec73b14953b4157af2b1c4c2156c5354.
From the api doc of ffmpeg, sws_getContext will return null if an error occurs, otherwise a pointer to an allocated context.
If the width is not divisible by the align, wrong data will be processed.