[mythtv] [mythtv-commits] Ticket #4621: dropped frames in MPEG4AVC (H.264) streams due to non monotone dts

Janne Grunau janne-mythtv at grunau.be
Tue Feb 12 00:25:39 UTC 2008


On Tuesday 12 February 2008 00:39:20 Mark Spieth wrote:
> >> does this also cater for mpeg2 pts/dts wrapping at 26.5h?
> >> otherwise it could cause problems for mpeg1/2.
> >
> > no, thanks for reminding me. I'll fix it asap.
>
> Im not sure, but I suspect in
>
> if  (temppts <= lastvpts && temppts + 10000 > lastvpts)
>
> temppts cant be both smaller and larger than lastvpts simultaneously.
> or will also not do things appropriately.

?
nobody claims that it should be simultaneously larger and smaller. It 
checks if the pts is at most 10 seconds after lastvpts.

> also need to consider pts effects when skipping forwards and
> backwards. also skipping across the wrap boundary.

lastvpts is reseted after skipping.

> wrap detection can be eliminated by setting the start pts/dts to 0 in
> lavf and translating all subsequent timestamps.
> This is why I went down this path when I investigated the mpeg wrap
> problem ages ago.
> currently I dont have the lavf/utils.c installed in my codebase but I
> can dig it out again if you like.

It shouldn't be necessary. This is only a workaround for our libav* 
generating some invalid DTSs.
I could only see the current code to create AV sync issues if the 
calculation is used all the time. But that is fortunately not the case. 

Janne


More information about the mythtv-dev mailing list