[MPlayer-users] Audio (LPCM) demux issue

Andrew Stevens andrew.stevens at nexgo.de
Thu Nov 20 21:21:09 CET 2003


Hi MPlayer authors,

Tracing some bug reports from some folk using the 'mplex' MPEG-2 multiplexer I 
maintain.  I encountered a report that although using a generic MPEG-2 mux 
profiles produced program streams where seek worked fine, using the DVD 
profiles caused some kid of audio mis-parse (white noise) after a seek.

A fair bit of experimentation later revealed the key issue was the 
pes_header_data_length.

If PES header data was <= 9 bytes the audio problem occurs.  For Pes header 
data > 9 bytes ... no issue. Weird huh... especially as glancing through the 
code in demux_mpg.c I couldn't find any obvious Bug in the parsing. 

Presumably, since the Problem only occurs on seek not during normal playback, 
there must be some additional parsing code someplace that requires these 
larger headers. However, the since the I have no idea how seeking works in 
mplayer I couldn't localize the precise cause.

N.b. 9 or 10 byte pes_header_data_length is fairly common in professionally 
mastered DVD's (the authors of the muxers used seemed to be fairly lazy and 
use stuffing bytes to give them pseduo-fixed-size headers).

To assist localisation I've upload two sample program streams via ftp.

lpcm-seek-test5.mpg includes 5 bytes of stuffing in the headers to reach a 10 
byte header size and seeks fine.

lpcm-seek-test4.mpg includes .. 4 bytes of stuffing and triggers audio 
glitches on seek.

The easy way to replicate is simply to use the slider in gmplayer to jump 
around the stream a few times.

	Andrew




More information about the MPlayer-users mailing list