[FFmpeg-devel] [PATCH v2 3/4] hwcontext_opencl: Remove the opencl_device_init in opencl_device_derive
mypopy at gmail.com
mypopy at gmail.com
Mon Jun 25 04:55:47 EEST 2018
On Thu, Jun 21, 2018 at 7:50 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>
> 2018-06-21 13:45 GMT+02:00, Jun Zhao <mypopydev at gmail.com>:
> > In opencl device derived case, don't need to call opencl_device_init.
> >
> > Signed-off-by: Jun Zhao <mypopydev at gmail.com>
> > ---
> > libavutil/hwcontext_opencl.c | 7 ++-----
> > 1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
> > index 9e96e96..295d6be 100644
> > --- a/libavutil/hwcontext_opencl.c
> > +++ b/libavutil/hwcontext_opencl.c
> > @@ -1196,7 +1196,7 @@ static int opencl_device_derive(AVHWDeviceContext
> > *hwdev,
> > AVHWDeviceContext *src_ctx,
> > int flags)
> > {
> > - int err;
> > + int err = 0;
>
> Why is this necessary?
> And if it is necessary, why is it part of this patch?
Just give a default value , no special reason
More information about the ffmpeg-devel
mailing list