View Single Post
Old 12th February 2005, 15:44   #107  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
@zeus163

That sure was an interesting issue. Your stream is extremely weird but you did uncover a real problem. The stream now has a home in the "Weird" subdirectory of my test file suite.

Your stream has no GOP headers, at all! That's legal of course. But the stream also doesn't use the temporal reference field properly.

I try to get the temporal reference of the first I frame. But now I realize that it should be the first I frame after a GOP header, because the GOP header resets the temporal reference to 0. So I do that now. Also, if there is no GOP header, I then do not use the temporal reference adjustment in the delay calculation.

While this gives me a delay of -404ms now for your stream, I'm still concerned that your stream does not use the temporal reference field properly, i.e., it doesn't increment for each frame in display order until reset by a GOP header, as required by the MPEG2 spec. And it has large values like 0x268. That won't throw me off, unless a GOP header comes along and the next I frame has a bad temporal reference. I do check for the value to be reasonable (less than 18), and I don't use it if it isn't. The worst thing that can happen is that the delay value given is wrong or absent, but this will occur only for illegal streams.

I'll put up an RC4 shortly with this change.

Last edited by Guest; 12th February 2005 at 16:28.
Guest is offline