Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning

2017-11-17 Thread Li, Zhong
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Carl Eugen Hoyos
> Sent: Friday, November 17, 2017 6:06 PM
> To: FFmpeg development discussions and patches
> <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning
> 
> 2017-11-17 6:52 GMT+01:00 Li, Zhong <zhong...@intel.com>:
> 
> >> > 2017-11-15 10:04 GMT+01:00 Zhong Li <zhong...@intel.com>:
> >> > > fix the compiling warning of "ignoring return value"
> >> >
> >> > > -ff_formats_ref(in_fmts, >inputs[0]->out_formats);
> >> > > -ff_formats_ref(out_fmts, >outputs[0]->in_formats);
> >> > > +if ((ret = ff_formats_ref(in_fmts,
> >> > > + >inputs[0]->out_formats))
> >> > > < 0)
> >> > > +return ret;
> >> > > +if ((ret = ff_formats_ref(out_fmts,
> >> > > + >outputs[0]->in_formats)) <
> >> > 0)
> >> >
> >> > Two additional lines are cheap.
> >>
> >> Just don't like any compiling warnings which may have potential
> >> issues just like this one.
> >> Personally speaking, I prefer to clear most of FFmpeg compiling warnings.
> >
> > Sorry, I may misunderstood due to miss some history discussion, here
> > you mean should be coding style making code clearer, right? Just like this:
> > "ret = ff_formats_ref();
> >  if (ret < 0) return ret;"
> 
> Yes, this is more readable.
> 
> Thank you, Carl Eugen

Got it, thanks. Patches will be updated.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning

2017-11-17 Thread Carl Eugen Hoyos
2017-11-17 6:52 GMT+01:00 Li, Zhong :

>> > 2017-11-15 10:04 GMT+01:00 Zhong Li :
>> > > fix the compiling warning of "ignoring return value"
>> >
>> > > -ff_formats_ref(in_fmts, >inputs[0]->out_formats);
>> > > -ff_formats_ref(out_fmts, >outputs[0]->in_formats);
>> > > +if ((ret = ff_formats_ref(in_fmts, >inputs[0]->out_formats))
>> > > < 0)
>> > > +return ret;
>> > > +if ((ret = ff_formats_ref(out_fmts,
>> > > + >outputs[0]->in_formats)) <
>> > 0)
>> >
>> > Two additional lines are cheap.
>>
>> Just don't like any compiling warnings which may have potential issues
>> just like this one.
>> Personally speaking, I prefer to clear most of FFmpeg compiling warnings.
>
> Sorry, I may misunderstood due to miss some history discussion, here you
> mean should be coding style making code clearer, right? Just like this:
> "ret = ff_formats_ref();
>  if (ret < 0) return ret;"

Yes, this is more readable.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning

2017-11-16 Thread Li, Zhong
> Subject: Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning
> 
> > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On
> Behalf
> > Of Carl Eugen Hoyos
> > Subject: Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling
> > warning
> >
> > 2017-11-15 10:04 GMT+01:00 Zhong Li <zhong...@intel.com>:
> > > fix the compiling warning of "ignoring return value"
> >
> > > -ff_formats_ref(in_fmts, >inputs[0]->out_formats);
> > > -ff_formats_ref(out_fmts, >outputs[0]->in_formats);
> > > +if ((ret = ff_formats_ref(in_fmts, >inputs[0]->out_formats)) <
> 0)
> > > +return ret;
> > > +if ((ret = ff_formats_ref(out_fmts,
> > > + >outputs[0]->in_formats)) <
> > 0)
> >
> > Two additional lines are cheap.
> 
> Just don't like any compiling warnings which may have potential issues just
> like this one.
> Personally speaking, I prefer to clear most of FFmpeg compiling warnings.

Sorry, I may misunderstood due to miss some history discussion, here you mean 
should be coding style making code clearer, right? Just like this:
"ret = ff_formats_ref();
 if (ret < 0) return ret;"
Please correct me if I am wrong.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning

2017-11-16 Thread Li, Zhong
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Carl Eugen Hoyos
> Subject: Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning
> 
> 2017-11-15 10:04 GMT+01:00 Zhong Li <zhong...@intel.com>:
> > fix the compiling warning of "ignoring return value"
> 
> > -ff_formats_ref(in_fmts, >inputs[0]->out_formats);
> > -ff_formats_ref(out_fmts, >outputs[0]->in_formats);
> > +if ((ret = ff_formats_ref(in_fmts, >inputs[0]->out_formats)) < 0)
> > +return ret;
> > +if ((ret = ff_formats_ref(out_fmts, >outputs[0]->in_formats)) <
> 0)
> 
> Two additional lines are cheap.

Just don't like any compiling warnings which may have potential issues just 
like this one.
Personally speaking, I prefer to clear most of FFmpeg compiling warnings.

> 
> Carl Eugen
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] lavf/qsv_vpp: fix compiling warning

2017-11-15 Thread Carl Eugen Hoyos
2017-11-15 10:04 GMT+01:00 Zhong Li :
> fix the compiling warning of "ignoring return value"

> -ff_formats_ref(in_fmts, >inputs[0]->out_formats);
> -ff_formats_ref(out_fmts, >outputs[0]->in_formats);
> +if ((ret = ff_formats_ref(in_fmts, >inputs[0]->out_formats)) < 0)
> +return ret;
> +if ((ret = ff_formats_ref(out_fmts, >outputs[0]->in_formats)) < 0)

Two additional lines are cheap.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel