mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
scaling and resampling contexts: fix null checks (via @expenses)
This commit is contained in:
@@ -55,7 +55,7 @@ impl Context {
|
||||
ptr::null_mut(),
|
||||
);
|
||||
|
||||
if ptr.is_null() {
|
||||
if !ptr.is_null() {
|
||||
match swr_init(ptr) {
|
||||
e if e < 0 => Err(Error::from(e)),
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ impl Context {
|
||||
ptr::null_mut(),
|
||||
);
|
||||
|
||||
if ptr.is_null() {
|
||||
if !ptr.is_null() {
|
||||
Ok(Context {
|
||||
ptr: ptr,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user