Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-27 Thread Michael Niedermayer
On Wed, Jan 27, 2016 at 09:35:42AM +, Carl Eugen Hoyos wrote: > Carl Eugen Hoyos ag.or.at> writes: > > > if (!strcmp(x4->level, "1b")) { > > level_id = 9; > > +} else if (atoi(x4->level) > 9) { > > +level_id = atoi(x4->level); > > Ping. > > If this

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-27 Thread Carl Eugen Hoyos
Carl Eugen Hoyos ag.or.at> writes: > if (!strcmp(x4->level, "1b")) { > level_id = 9; > +} else if (atoi(x4->level) > 9) { > +level_id = atoi(x4->level); Ping. If this patch is not ok, please explain for what input it behaves incorrectly. Thank you,

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-19 Thread Carl Eugen Hoyos
Carl Eugen Hoyos ag.or.at> writes: > Nicolas George nsup.org> writes: > > > Le nonidi 29 nivôse, an CCXXIV, Carl Eugen Hoyos a écrit : > > > The original patch (that does not care about tail > > > since it can't be reached anyway) uses atoi(). > > > Is that not ok? > > > > atoi() has

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-18 Thread Carl Eugen Hoyos
Nicolas George nsup.org> writes: > Le nonidi 29 nivôse, an CCXXIV, Carl Eugen Hoyos a écrit : > > The original patch (that does not care about tail > > since it can't be reached anyway) uses atoi(). > > Is that not ok? > > atoi() has undefined behaviours in case of error How can I produce an

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-17 Thread Nicolas George
Le nonidi 29 nivôse, an CCXXIV, Carl Eugen Hoyos a écrit : > The original patch (that does not care about tail > since it can't be reached anyway) uses atoi(). > Is that not ok? atoi() has undefined behaviours in case of error, and has a trivial replacement that works best: it should not be used

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-17 Thread Carl Eugen Hoyos
Michael Niedermayer niedermayer.cc> writes: > > > > > this should check that teres no "tail" after the integer > > > > > > > > For which command line will this make a difference? > > > > I didn't find one... > indeed, i guess x264 checks this internally before > our code gets a chance to fail

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-17 Thread Michael Niedermayer
On Sun, Jan 17, 2016 at 11:17:36PM +, Carl Eugen Hoyos wrote: > Michael Niedermayer niedermayer.cc> writes: > > > > > > > this should check that teres no "tail" after the integer > > > > > > > > > > For which command line will this make a difference? > > > > > I didn't find one... > > >

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-17 Thread Carl Eugen Hoyos
Michael Niedermayer niedermayer.cc> writes: > > So is the patch ok? > > id use strtol instead of strtod to parse a value that > is expeted to be in integer, or is it not expected to > be an integer ? The original patch (that does not care about tail since it can't be reached anyway) uses

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-14 Thread Michael Niedermayer
On Tue, Jan 12, 2016 at 02:39:35PM +0100, Carl Eugen Hoyos wrote: > On Tuesday 12 January 2016 02:31:48 pm Michael Niedermayer wrote: > > > > > +level_id = atoi(x4->level); > > > > > > > > this should check that teres no "tail" after the integer > > > > > > For which command line will

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-12 Thread Carl Eugen Hoyos
On Tuesday 12 January 2016 02:31:48 pm Michael Niedermayer wrote: > > > > +level_id = atoi(x4->level); > > > > > > this should check that teres no "tail" after the integer > > > > For which command line will this make a difference? > > I didn't find one... > > didnt try but i was

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-12 Thread Michael Niedermayer
On Tue, Jan 12, 2016 at 02:10:08PM +0100, Carl Eugen Hoyos wrote: > On Tuesday 12 January 2016 01:55:30 pm Michael Niedermayer wrote: > > On Mon, Jan 11, 2016 at 10:58:55AM +0100, Carl Eugen Hoyos wrote: > > > Hi! > > > > > > I guess that attached patch fixes the additional issue in ticket #3307.

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-12 Thread Michael Niedermayer
On Mon, Jan 11, 2016 at 10:58:55AM +0100, Carl Eugen Hoyos wrote: > Hi! > > I guess that attached patch fixes the additional issue in ticket #3307. > > Please comment, Carl Eugen > libx264.c |2 ++ > 1 file changed, 2 insertions(+) > cea8163693a2a78b9dc2d1929082e7c76ac542ac

Re: [FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-12 Thread Carl Eugen Hoyos
On Tuesday 12 January 2016 01:55:30 pm Michael Niedermayer wrote: > On Mon, Jan 11, 2016 at 10:58:55AM +0100, Carl Eugen Hoyos wrote: > > Hi! > > > > I guess that attached patch fixes the additional issue in ticket #3307. > > > > Please comment, Carl Eugen > > > > libx264.c |2 ++ > > 1 file

[FFmpeg-devel] [PATCH]lavc/x264: Improve level setting

2016-01-11 Thread Carl Eugen Hoyos
Hi! I guess that attached patch fixes the additional issue in ticket #3307. Please comment, Carl Eugen diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 88406a3..c1e52a1 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -559,6 +559,8 @@ static av_cold int