[FFmpeg-devel] [RFC] be more kind with wrong psm in mpeg ps

Måns Rullgård mans
Mon Apr 7 19:28:09 CEST 2008

Michael Niedermayer wrote:
> On Mon, Apr 07, 2008 at 04:36:41PM +0200, Baptiste Coudurier wrote:
>> M?ns Rullg?rd wrote:
>> > Baptiste Coudurier wrote:
>> >> Hi,
>> >>
>> >> Attached patch make ps demuxer correctly detects lpcm files with wrong
>> >> psm (mplayer and vlc plays them correctly).
>> >>
>> >> Should fix wrong_psm_lpcm.mpg on mplayerhq.
>> >>
>> >> I think those checks are reasonable. Comments ?
>> >
>> > I don't like it.  It can break valid files.
>> >
>> Question is does it ?
>> I'd like some real measures of the effects of the psm considering vlc
>> and mplayer ignore it and play many files.
>> if psm says AC3 or DTS then fine, but if psm says private data or mpeg1
>> audio, it's reasonable to guess that it is not what psm says.
>> I think I'll ask for a vote on this, since I would really like being
>> able to play those files.
> I am in favor of having as many files as possible supported. So if this patch
> makes files playable that arent currently and we have none that it breaks
> then, iam in favor of the patch.
> Maybe a compromise would be printing a "This file specifies an invalid codec
> in the PSM"?
> Also without checking the spec, what is invalid if a AC3/DTS/MP3/LPCM is
> "private data"? IMHO if something else indicates a more specific type that
> should override "private data". But maybe i misunderstood something?

If the PSM says private data (stream_type == 6), there is no telling what
it is, unless some descriptor or other identifies it.  AC3, DTS, and PCM
are not supported by the ISO spec at all, and several incompatible
extensions to handle these codecs exist, the most common being that found
on DVDs.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list