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

Mark Spieth mark at digivation.com.au
Mon Feb 11 23:39:20 UTC 2008

>> 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.
also need to consider pts effects when skipping forwards and backwards.
also skipping across the wrap boundary.

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.

then you just have to manage the skip and fast forward issue.


More information about the mythtv-dev mailing list