On Sun, 24 Jan 2016 13:12:44 +0000 Mark Thompson <s...@jkqxz.net> wrote:
> On 24/01/16 00:21, Timothy Gu wrote: > > On Sat, Jan 23, 2016 at 07:17:00PM +0000, Mark Thompson wrote: > >> + err = ...(...); > >> + if(err) { > > > > err < 0? > > > > Is there a policy on this? > > For functions with only zero success or error code, I would prefer to check > for nonzero as error. It will catch any strange cases, including raising an > error if the underlying API changes to have more different success cases that > you need to modify the code to handle. Almost all functions in ffmpeg that return error codes return <0 on error, and >=0 on success. It would thus be advisable to follow this convention. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel