[FFmpeg-devel] [PATCH] ogg: Fix seek to zero and packet pts after read through.

Dale Curtis dalecurtis at chromium.org
Fri May 4 19:58:45 CEST 2012


On Fri, May 4, 2012 at 5:52 AM, Michael Niedermayer <michaelni at gmx.at>wrote:

> On Thu, May 03, 2012 at 08:09:21PM -0700, Dale Curtis wrote:
> > Sorry for the delay, I've been out on vacation the past week. The pts/dts
> > for the first frame on the first pass are 0,0. Why is it incorrect to
> have
> > a pts/dts of 0,0 on the second pass as well? Thanks in advance for your
> > patience.
>
> 0,0 is incorrect, its wrong on the first AND second pass.
>
> Ive fixed it now.
>

Thanks Michael. I'm unable to reproduce the issues you're seeing though.
Can you send me the test program and video you're using? I just reran my
test case with our patch applied to ffmpeg HEAD and the timestamps are
coming out correct:

libre.ogg w/ patch and w/ video stream index seek:
pts: 79211520 -- dts: 79211520
pts: 79211520 -- dts: 79211520
pts: 79212544 -- dts: 79212544
pts: 79213568 -- dts: 79213568
pts: 79214592 -- dts: 79214592

seek to zero:
pts: 79211520 -- dts: 79211520
pts: 79211520 -- dts: 79211520
pts: 79212544 -- dts: 79212544
pts: 79213568 -- dts: 79213568
pts: 79214592 -- dts: 79214592

Time stamps on the video stream are also correct w/ the patch:
pts: 44903 -- dts: 44903
pts: 44904 -- dts: 44904
pts: 44905 -- dts: 44905
pts: 44906 -- dts: 44906
pts: 44907 -- dts: 44907

seek to zero:
pts: 44903 -- dts: 44903
pts: 44904 -- dts: 44904
pts: 44905 -- dts: 44905
pts: 44906 -- dts: 44906
pts: 44907 -- dts: 44907

Curiously using libre.ogg and seeking on the audio index w/o the patch
yields the correct results too. Unfortunately this doesn't seem to work
with sync1.ogg.

I've repackaged the patch, test case, and stream snippet I'm using here, so
we can make sure we're on the same page:

http://commondatastorage.googleapis.com/dalecurtis-shared/ogg-seek-test-2.tar.bz2

- dale


More information about the ffmpeg-devel mailing list