scaling and resampling contexts: fix null checks

dc6ace91ec

Fixes #1.
This commit is contained in:
Erin Moon 2018-09-21 10:49:03 -05:00 committed by Zhiming Wang
parent e13b01f30b
commit a7ea073619
No known key found for this signature in database
GPG Key ID: 5B58F95EC95965D8
2 changed files with 2 additions and 2 deletions

View File

@ -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)),

View File

@ -56,7 +56,7 @@ impl Context {
ptr::null_mut(),
);
if ptr.is_null() {
if !ptr.is_null() {
Ok(Context {
ptr: ptr,