[vlc-devel] Re: Coping with faulty MPEG streams and SVCD subtitles

Gildas Bazin gbazin at netcourrier.com
Mon Dec 15 20:17:59 CET 2003


On Sunday 14 December 2003 23:53, R. Bernstein wrote:
> I'd like to add a hack to vlc's system.c to make it more tolerant of
> the kind of bug in MPEG streams that WinSubMux produces. This should
> help moving SVCD subtitle support forward.
> 

I agree that it would be nice to have a work-around for this problem.

> The current situtation: vlc's MPEG demuxer does not tolerate the
> faulty kind of MPEG stream produced by the SVCD and CVD subtitling
> program WinSubMux. Apparently WinSubMux does not renumber the pack
> headers of a MPEG when it multiplexes subtitles in. Although this
> program appears to be used quite a bit, it is not open source, and the
> author is somewhat anonymous. I've sent a bug report to the contact
> listed for the program, but I doubt if this long-outstanding bug will
> be fixed in the predictable future.
> 
...
> 
> As a proof of concept, I patched my copy of system.c so that the SCR
> is delayed by one PACK value and if we see a private stream, this
> signals ignoring the current PACK header SCR. 
> 

AFAICT delaying the SCR by one pack header won't work. The reason is that 
PTS/DTS timestamps are linked to the PCR so you simply can't use a PTS/DTS 
in a PES packet if you haven't validated the previous PCR. For instance if 
there is a discontinuity in the timestamps but you don't validate the PCR 
than you won't discover this discontinuity so you'll end up sending to the 
decoders data with wrong timestamps.

The solution could be to validate the PCR only when the first PES is 
received.

> Unless there are objections, I'll clean up the code a little and
> commit it.
> 

Before doing any changes to this part of the code, please wait for 0.7.0 to 
be released (waiting for 0.7.1 might be even wiser ;).

--
Gildas

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list