[Ffmpeg-devel] Bug in pts computation in compute_pkt_fields() ?
Wolfram Gloger
wmglo
Tue Mar 20 18:30:05 CET 2007
Hi,
> > That is probably raw mpeg-ts, right?
> >
> No, it is already remuxed to pes.
Ok.
> >> /* handle wrapping */
> >> if(st->cur_dts != AV_NOPTS_VALUE){
> >> if(pkt->pts != AV_NOPTS_VALUE)
> >> pkt->pts= lsb2full(pkt->pts, st->cur_dts, st->pts_wrap_bits);
> >> if(pkt->dts != AV_NOPTS_VALUE)
> >> pkt->dts= lsb2full(pkt->dts, st->cur_dts, st->pts_wrap_bits);
> >> }
> >>
> >> The result is negative pts value for the packet. So I guess this is a
> >> bug in compute_pkt_fields(), or am I doing something wrong?
> >
> > Please check that st->pts_wrap_bits is set to 60 (and not 33) if the
> > input stream is mpeg-ts. A long time ago I had a similar problem
> > which was caused by the transport stream not being detected correctly.
> >
>
> Hmm, you are right, st->pts_wrap_bits is 33 and it should be 60. If I
> manually set it to 60 it works as it should. How did you fix that problem?
Sorry, I was wrong -- it seems pts_wrap_bits being 33 is correct.
Can you print all the values
pkt->pts st->cur_dts st->pts_wrap_bits
so we can see what's really going on here?
Regards,
Wolfram.
More information about the ffmpeg-devel
mailing list