[Live-devel] How to recover from parsing exceptionaldatasituation!
Mike Yan
mikey at tlcwatch.com
Wed Jun 16 16:29:22 PDT 2004
While I can't explain why, I am not a video program expert. I just assume
the skipping number should be combination of "4n + 1" and "3k". As I said, I
have been doing a lot of test. I tried a lot number like "9", "21" until
"33", it gave me unbelievable result -- no matter how I switched the
streaming source, it recovered right way.
-----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