[FFmpeg-devel] [PATCH] Print AV_NOPTS_VALUE in seek test

Baptiste Coudurier baptiste.coudurier
Thu Oct 2 20:09:03 CEST 2008


Hi Ramiro,

Ramiro Polla wrote:
> Hi,
> 
> On Fri, Sep 26, 2008 at 9:26 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> On Tue, May 06, 2008 at 12:05:52AM +0100, Ramiro Polla wrote:
>>> Michael Niedermayer wrote:
>>>> On Mon, May 05, 2008 at 05:35:37PM +0100, Ramiro Polla wrote:
>>>>> Hello,
>>>>>
>>>>> Ramiro Polla wrote:
>>>>>> Michael Niedermayer wrote:
>>>>>>> On Thu, May 01, 2008 at 09:28:37PM +0100, Ramiro Polla wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Attached patch makes seek_test print AV_NOPTS_VALUE instead of some big
>>>>>>>> negative and apparently meaningless number.
>>>>>>> Complicating the code for no apparent reason, the regression tests are
>>>>>>> just for developers knowing what they do. And someone not knowing what
>>>>>>> the big meaningless number is wont be able to make any sense of
>>>>>>> "AV_NOPTS_VALUE" either.
>>>>>> Seek test fail on MinGW because MSVCRT doesn't properly printf() big
>>>>>> numbers. Instead of printing
>>>>>> pts:-102481911520608.625000
>>>>>> it prints
>>>>>> pts:-102481911520608.600000
>>>>> Could you please reconsider this?
>>>>> Seek tests with latest MinGW CVS only fail because of this printf. The
>>>>> tests don't really fail, but the way the results are printed do. This can
>>>>> easily be avoided in FFmpeg's side by writing cleaner output.
>>>> Well if you really insist then try
>>>> #define ts2float(ts) ((ts) == AV_NOPTS_VALUE ? 0.0/0.0 : ts)
>>> MSVCRT prints "-1.INF00" or something like that, which is much different
>>> than the POSIX "nan". Anyways POSIX allows other stuff to print out
>>> instead of "nan", so it wouldn't even be compatible in all
>>> POSIX-compliant systems.
>>> I'll try to think of some other way.
>> ping?
> 
> At some point in time this stopped failing. Now I finally found out why.
> 
> From http://sourceforge.net/project/shownotes.php?release_id=24832 :
> ----------------------------------------------------------------------
> Release Name: Current Release: mingw-runtime-3.15
> 
> Notes:
> New features in release 3.15
> ============================
> 
> [...]
> 
> * A replacement implementation for MinGW's snprintf() and vsnprintf()
>   functions is provided; this further extends the scope of replacement
>   to include printf(), fprintf(), sprintf(), vprintf(), vfprintf()
>   and vsprintf() featuring:--
> 
>   - Full support for *all* of the *standard* format conversion specs
>     mandated by ISO-C99 and POSIX, (excluding POSIX-XSI extensions).
> ----------------------------------------------------------------------
> 
> Now with mingw-runtime 3.15 and being _ISOC99_SOURCE defined, this is
> no longer a problem.

Nice, thanks for looking at this issue.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA




More information about the ffmpeg-devel mailing list