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

Baptiste Coudurier baptiste.coudurier
Mon Apr 21 14:36:25 CEST 2008


M?ns Rullg?rd wrote:
> Baptiste Coudurier wrote:
>> Baptiste Coudurier wrote:
>>> Hi,
>>>
>>> M?ns Rullg?rd wrote:
>>>> 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.
>>> Atm, if psm says private data, track is just ignored by lavf, however,
>>> if track uses dvd private data mechanism, it is IMHO easy to support it.
>>>
>>> Do we need a vote for this ? I'd really like lavf to support those files
>>> like mplayer and vlc do.
>> Ping
> 
> I still don't like it.  Idiots that create invalid files can blame
> themselves.
> 

While I understand your point, the point here is more about general
policy, and general policy is to support as many files as we can without
breaking and polluting too much the code.

Supporting those files is easily possible, and for now we have 2 persons
for it (michael and me), and one against (you).

We are all for compromise and michael suggested one solution. Will you
be happy with the proposed solution ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312





More information about the ffmpeg-devel mailing list