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

Mike Yan mikey at tlcwatch.com
Thu Jun 17 14:30:44 PDT 2004


Hi Ross,

I have been testing your new code for solving the switching issue. It works
great. Most times it recover right way and more important it's more
reliable. I only recommend put higher skipping number like 9 instead of 1.


-----Original Message-----
From: live-devel-bounces at ns.live.com [mailto:live-devel-bounces at ns.live.com]
On Behalf Of Ross Finlayson
Sent: Wednesday, June 16, 2004 2:54 PM
To: LIVE.COM Streaming Media - development & use
Subject: RE: [Live-devel] How to recover from parsing
exceptionaldatasituation!


>However, I did a lot of test on the switching issue and have been made some
>modification on MPEG1or2Demux class base on the changes you made on the
last
>version (6.14.2004). Here is the change:
>
>     setParseState(PARSING_PACK_HEADER); // ensures we progress over bad
data
>     skipBytes(33);                      (line 399 in MPEG1or2Demux.cpp)
>
>Basically, I changed the number of the bytes to skip from 1 to 33 after
>encounter bad data.

Why 33?  This seems rather arbitrary.  In fact, it seems possible that in 
skipping that many bytes, you'll skip over a 'system code' that you're 
looking for.

Here is the actual change that I will be making (in the next release of the 
code):

     setParseState(PARSING_PACK_HEADER); // ensures we progress over bad
data
     if (first4Bytes&0xFF > 1) { // a system code definitely doesn't start
here
       skipBytes(4);
     } else {
       skipBytes(1);
     }




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

_______________________________________________
live-devel mailing list
live-devel at lists.live.com
http://lists.live.com/mailman/listinfo/live-devel




More information about the live-devel mailing list