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

Michael Niedermayer michaelni at gmx.at
Sat May 5 11:13:25 CEST 2012


On Fri, May 04, 2012 at 06:00:21PM -0700, Dale Curtis wrote:
> On Fri, May 4, 2012 at 5:52 PM, Dale Curtis <dalecurtis at chromium.org> wrote:
> 
> > On Fri, May 4, 2012 at 5:28 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> >
> >> On Fri, May 04, 2012 at 03:42:00PM -0700, Dale Curtis wrote:
> >> > On Fri, May 4, 2012 at 3:11 PM, Michael Niedermayer <michaelni at gmx.at
> >> >wrote:
> >> >
> >> > >
> >> > > i dont see a difference between
> >> > > seek-test sync1.ogg -frames 20  | head
> >> > > and
> >> > > seek-test sync1.ogg -frames 20  -seekback 0| head
> >> > >
> >> > > ogg-ts sync1.ogg
> >> > > also shows no errors
> >> > >
> >> > > so maybe my last few commits fixed that too or iam testing the wrong
> >> > > thing.
> >> > > Can you confirm if this issue is still reproduceable
> >> > >
> >> > >
> >> > Awesome! Looks fixed for sync1.ogg, however libre.ogg is still messed up
> >> > (maybe a bad test case?):
> >> >
> >> > $ libavformat/seek-test /var/www/libre.ogg -frames 10  2>/dev/null |
> >> head
> >> > -n 10
> >> > ret: 0         st: 0 flags:0 dts: 1796.120000 pts: 1796.120000 pos:
> >> 6183
> >> > size:  3964
> >> > ret: 0         st: 1 flags:1 dts: 1796.179592 pts: 1796.179592 pos:
> >>  10190
> >> > size:    91
> >> > ret: 0         st: 0 flags:1 dts: 1796.160000 pts: 1796.160000 pos:
> >>  10309
> >> > size: 16266
> >> > ret: 0         st: 1 flags:1 dts: 1796.179592 pts: 1796.179592 pos:
> >>  26666
> >>
> >> fixed the duplicate timestamp
> >>
> >>
> > Hurm, ogg-ts is showing two 0's for the first timestamps using sync1.ogg:
> >
> > dalecurtis at xorax /d/code/tests $ ./ogg-ts /var/www/sync1.ogg
> > pts:        0
> > pts:        0
> > pts:      128
> > pts:      256
> > pts:     1280
> > pts:     1408
> > pts:     1536
> > pts:     2112
> > pts:     3136
> > pts:     4160
> >
> > - dale
> >
> 
> Better report with seek-test:
> 
> $ libavformat/seek-test /var/www/sync1.ogg -frames 10 2>/dev/null | head -n
> 10
> ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   3340 size:
>    47
> ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   3340 size:

Fixed

note, the first sample is decoded from the second packet thus its
timestamp of 0 is correct, this forces the first to be negative if its
not equal and has some real valued timestamp
and this will for example cause a forward seek to 0 to seek to
around 0.4 seconds. A backward seek to 0 works as expected though

[...]
-- 
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: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120505/3e994470/attachment.asc>


More information about the ffmpeg-devel mailing list