2017-03-30 8:12 GMT+08:00 Michael Niedermayer <mich...@niedermayer.cc>:
> On Thu, Mar 30, 2017 at 07:00:39AM +0800, Steven Liu wrote: > > 2017-03-30 5:42 GMT+08:00 Michael Niedermayer <mich...@niedermayer.cc>: > > > > > On Wed, Mar 29, 2017 at 08:41:38PM +0800, Steven Liu wrote: > > > > v2 fixed: > > > > 1. from autodetect to disabled > > > > 2. from camelCase code style to ffmpeg code style > > > > 3. from RepType to AVMediaType > > > > 4. fix variable typo > > > > 5. change time value from uint32_t to uint64_t > > > > 6. removed be used once API > > > > 7. change 'time(NULL)`, except it is not 2038-safe.' to av_gettime > and > > > av_timegm > > > > 8. merge complex free operation to free_fragment > > > > 9. use API from snprintf to av_asprintf > > > > > > > > v3 fixed: > > > > 1. fix typo from --enabled-xml2 to --enable-xml2 > > > > > > > > v4 fixed: > > > > 1. from --enable-xml2 to --enable-libxml2 > > > > 2. move system includes to top > > > > 3. remove nouse includes > > > > 4. rename enum name > > > > 5. add a trailing comma for the last entry enum > > > > 6. fix comment typo > > > > 7. add const to DASHContext class front > > > > 8. check sscanf if return arguments and give warning message when > error > > > > 9. check validity before free seg->url and seg > > > > > > > 10. check if the val is null, before use atoll > > > > > > what if it is non null but not a number or a number exceeding the > range? > > > strtoll() would allow checking for things like that > > > > > you mean: check a result if the string is number or not? and if it is > > number then use stroll. if not, give a 0? > > i was thinking that strtoll() should be used in place of atoll() > and if strtoll() fails to parse the argument fully some sort of > error handling or reporting should happen > atoll() does not allow to detect errors > 123hallo will be read as 123 no way to detect that this is not a > number. strtoll() has a tail allowing to detect that the argument was > not a valid number > > but maybe i misunderstand why atoll() is used in this code. > Normally atoll() and similar functions are bad due to the lack of any > real error checking ability > Ah. I get it, a new patch later. > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Let us carefully observe those good qualities wherein our enemies excel us > and endeavor to excel them, by avoiding what is faulty, and imitating what > is excellent in them. -- Plutarch > > _______________________________________________ > 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