[FFmpeg-devel] [RFC] mpegts: Provide a monotonic timestamp to the outside world

Michael Niedermayer michaelni at gmx.at
Sun Nov 25 05:02:56 CET 2012


Hi

On Thu, Nov 15, 2012 at 11:27:56PM +0100, Harald Axmann wrote:
> On 15.11.2012 14:35, Michael Niedermayer wrote:
> >[...]
> >Actually 3 fate tests fail with this patch, not just one
> >make: *** [fate-bfi] Error 1
> >make: *** [fate-bmv-video] Error 1
> >make: *** [fate-nuv-rtjpeg-fh] Error 1
> >
> >you can run "all" tests with make -k fate
> >
> >("all" is except some dependant tests like seektests)
> >
> >[...]
> 
> Thanks, "-k" helps a lot! I have fixed "fate-bfi" and "fate-bmv-video". The new patch (still with debugging output) is attached.
> 
> Now all tests except "fate-nuv-rtjpeg-fh" work (because of the intended wrapping behaviour).
> 
> --- ./tests/ref/fate/nuv-rtjpeg-fh      2012-10-21 19:15:38.477160546 +0200
> +++ tests/data/fate/nuv-rtjpeg-fh       2012-11-15 22:30:06.145216588 +0100
> @@ -1,51 +1,51 @@
>  #tb 0: 1/50
> -0,          0,          0,        1,   221184, 0xf48c94f6
> [...]
> -0,         51,         51,        1,   221184, 0x10a59eb5
> +0,         80,         80,        1,   221184, 0xf48c94f6
> [...]
> +0,        131,        131,        1,   221184, 0x10a59eb5
> Test nuv-rtjpeg-fh failed. Look at tests/data/fate/nuv-rtjpeg-fh.err for details.
> 
> nuv-rtjpeg-fh.err with debug output is also attached.

I think theres some bug in the nuv demuxer, ive just posted a patch
that fixes it, this should also fix this difference

also, the wraping code should be optional, this way it can also quickly
be tested if any future bugs change if its enabled or disabled.

[...]

> +/**
> + * Wrap a given time stamp, if there is an indication for an overflow
> + *
> + * @param st stream
> + * @param timestamp the time stamp to wrap
> + * @return resulting time stamp
> + */
> +static int64_t wrap_timestamp(AVStream *st, int64_t timestamp)
> +{
> +    if (st->pts_wrap_bits != 64 && st->pts_wrap_reference != AV_NOPTS_VALUE &&

st->pts_wrap_bits < 64 feels more correct


[...]
> @@ -739,6 +758,10 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
>          }
>  
>          st= s->streams[pkt->stream_index];
> +        av_log(s, AV_LOG_INFO, "stream %d: pts %lld -> ", pkt->stream_index, pkt->pts);
> +        pkt->dts = wrap_timestamp(st, pkt->dts);
> +        pkt->pts = wrap_timestamp(st, pkt->pts);
> +        av_log(s, AV_LOG_INFO, "%lld\n", pkt->pts);

that stuff should be droped it spams the terminal too much

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121125/245f1527/attachment.asc>


More information about the ffmpeg-devel mailing list