hwcontext_opencl: Remove the opencl_device_init in opencl_device_derive
authorJun Zhao <mypopydev@gmail.com>
Wed, 20 Jun 2018 03:13:59 +0000 (11:13 +0800)
committerJun Zhao <jun.zhao@intel.com>
Thu, 28 Jun 2018 21:23:20 +0000 (05:23 +0800)
In opencl device derived case, don't need to call opencl_device_init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
libavutil/hwcontext_opencl.c

index 06448c6..ad82ef6 100644 (file)
@@ -1361,10 +1361,7 @@ static int opencl_device_derive(AVHWDeviceContext *hwdev,
         break;
     }
 
-    if (err < 0)
-        return err;
-
-    return opencl_device_init(hwdev);
+    return err;
 }
 
 static int opencl_get_plane_format(enum AVPixelFormat pixfmt,