[FFmpeg-devel] [PATCH] seek print NOPTS

Michael Niedermayer michaelni
Tue Oct 20 16:16:39 CEST 2009


On Tue, Oct 20, 2009 at 02:59:16PM +0200, Reimar D?ffinger wrote:
> Hello,
> this patch should fix the remaining unaligned output of seek test by printing
> "NOPTS" when the time stamp is AV_NOPTS_VALUE.

>  seek.regression.ref |  614 ++++++++++++++++++++++++++--------------------------
>  seek_test.c         |   21 +
>  2 files changed, 326 insertions(+), 309 deletions(-)
> f707335bc3c151e510613cc68adfbbcbdbd30474  seek_nopts.diff
[...]
> Index: tests/seek_test.c
> ===================================================================
> --- tests/seek_test.c	(revision 20330)
> +++ tests/seek_test.c	(working copy)
> @@ -22,6 +22,7 @@
>  #include <stdint.h>
>  #include <stdlib.h>
>  #include <stdio.h>
> +#include <string.h>
>  
>  #include "libavutil/common.h"
>  #include "libavformat/avformat.h"
> @@ -45,6 +46,17 @@
>      }
>  }
>  
> +static void ts_str(char buffer[60], int64_t ts, AVRational base)
> +{
> +    double tsval;
> +    if (ts == AV_NOPTS_VALUE) {
> +        strcpy(buffer, " NOPTS   ");
> +        return;
> +    }
> +    tsval = ts * av_q2d(base);
> +    snprintf(buffer, 60, "%9f", tsval);
> +}

if (ts == AV_NOPTS_VALUE)
    tsval= NAN;
...
av_log("...%123f...", ... tsval

does not work on all supported archs?
if not then your patch is ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091020/46833f3e/attachment.pgp>



More information about the ffmpeg-devel mailing list