[FFmpeg-devel] [PATCH 2/2] avcodec/libvpxenc: update the ranges for "cpu_used" so it matches the "speed" alias

James Zern jzern at google.com
Sat Jun 7 00:03:40 CEST 2014


On Fri, Jun 6, 2014 at 2:58 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Fri, Jun 06, 2014 at 01:57:58PM -0700, James Zern wrote:
>> On Fri, Jun 6, 2014 at 12:27 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
>> > ---
>> >  libavcodec/libvpxenc.c |    5 ++---
>> >  1 file changed, 2 insertions(+), 3 deletions(-)
>> >
>>
>> lgtm.
>
> applied
>
>
>> For error reporting purposes it's probably best to have the
>> range checks duplicated here, though it can be a bit fragile...
>
> iam not sure i understand, setting the options via avoptions should
> check the values validity so the context field should never be
> outside the range unless i miss something or misunderstand
> but i can add a explicit check if you want
>

No the checks are good here, I was just commenting that the library
should also be performing them, so in a wrapper like this we end up
with a bit of duplication that, should the library change, needs an
update.

> thanks
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> While the State exists there can be no freedom; when there is freedom there
> will be no State. -- Vladimir Lenin


More information about the ffmpeg-devel mailing list