[Live-devel] How to recover from parsing exceptionaldatasituation!

Ross Finlayson finlayson at live.com
Tue Jun 15 04:13:32 PDT 2004


>One thing I noticed that the period of recovering is
>uncertain. Sometimes it's fast, sometimes it's slow.

As long as you switch arbitrarily between streams, there's nothing you can 
do about this, because as far as the MPEG parsing code is concerned, it's 
seeing a corrupted input stream.

The only way to avoid this is to be smarter about when you switch streams: 
E.g., Don't switch away from a stream until you reach a 'pack start code' 
(0x000001BA), and then don't start using the new stream until you see a 
'pack start code'.  That way, the overall stream will look - to the parsng 
code - like a single, consistent MPEG stream.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list