[FFmpeg-devel] [PATCH] Incorrect Ogg Theora duration

Michael Niedermayer michaelni
Thu Jun 26 15:38:39 CEST 2008


On Thu, Jun 26, 2008 at 02:17:48PM +0100, M?ns Rullg?rd wrote:
> 
> Michael Niedermayer wrote:
> > I am also for riping the start_time calculation out,
> > mans? are you ok with removing the start_time guessing code?
> > The values it guesses are wrong and do not match the timestamp of the
> > first packet. And they happen to mess up stream copy as ffmpeg subtracts
> > the smallest start_time which leads to many packets with negative timestamps.
> >
> > ill apply below in a few days if i hear no objections:
> >
> >      ogg->size = size;
> >      ogg_restore (s, 0);
> > -    ogg_save (s);
> > -    while (!ogg_read_page (s, &i)) {
> > -        if (i == idx && ogg->streams[i].granule != -1 &&
> ogg->streams[i].granule != 0)
> > -            break;
> > -    }
> > -    if (i == idx) {
> > -        s->streams[idx]->start_time = ogg_gptopts (s, idx,
> ogg->streams[idx].granule);
> > -        s->streams[idx]->duration -= s->streams[idx]->start_time;
> > -    }
> > -    ogg_restore (s, 0);
> >
> >      return 0;
> 
> OK

applied

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20080626/ca4ee2f2/attachment.pgp>



More information about the ffmpeg-devel mailing list