Re[2]: [XviD-devel] maybe I found a bug

Christoph Lampert xvid-devel@xvid.org
Mon, 30 Sep 2002 11:19:34 +0200 (CEST)


On Mon, 30 Sep 2002, Radoslaw 'sysKin' Czyz wrote:

> > frame->seconds is set in encoder.c by set_timecodes(). That's part of the
> > new timecodes I commited two days ago.
> 
> And set_timecodes() uses reference frame's timestamp. Which is not
> initialized for first frame in the bitstream, is it?

It should be! 

> I added the following line to encoder_create:
>         pEnc->reference->stamp = pEnc->current->stamp = 0;
> and everything is great now :-)

So it wasn't?  *Ouch!*  

pEnc->reference->stamp=0 shouldn't be necessary (it's done by 
set_timecodes), but it doesn't hurt either... 

*bugfix committed to branch* 

gruel