View Single Post
Old 14th August 2011, 18:32   #1014  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by nevcairiel View Post
Sadly, thats won't really work. That theory would only work out 100% on frames where PTS=DTS, but thats not true for I-Frames if B-Frames are present. So it would produce different results with the two different demuxing modes.
That's too bad.

My alternative idea was to simply monitor the incoming timestamps. It should be easy enough to automatically detect whether the incoming timestamps are DTS or PTS, and to adjust the decoder behaviour accordingly. For the first couple of frames the decoder might then use the wrong logic, but that shouldn't be too much of a problem. In theory the decoder could even store the detected logic to the registry, so the next time it will be right from the start. This way no manual list needs to be maintained.
madshi is offline   Reply With Quote