[FFmpeg-devel] [PATCH] Dump info for all streams (not just those known to be in a program)

Måns Rullgård mans
Sat Nov 10 17:42:12 CET 2007


Wolfram Gloger <wmglo at dent.med.uni-muenchen.de> writes:

> Hi,
>
>> That's not the point.  Even if you've never seen it go wrong, it's
>> still guesswork, and guessing has no place in FFmpeg.
>
> Ok, I've checked again, the 'guessing' we're talking about is:
>
>                 if (pes->header[0] == 0x00 && pes->header[1] == 0x00 &&
>                     pes->header[2] == 0x01) {
>                     /* it must be an mpeg2 PES stream */
>                     code = pes->header[3] | 0x100;
>                     if (!((code >= 0x1c0 && code <= 0x1df) ||
>                           (code >= 0x1e0 && code <= 0x1ef) ||
>                           (code == 0x1bd) || (code == 0x1fd)))
>                         goto skip;
>
> I can't see that going wrong, at least no more than e.g. our probe

That's code snippet isn't the problem.  The problem is the default
case in the switch statement in the new_pes_av_stream() function.

> functions for mpeg streams can go wrong.  Are you suggesting to
> remove mpegps_probe() as well?

Certainly not.

> [BTW shouldn't mpegps_probe() be exported and used in that place in
>  mpegts.c to remove duplication?]

No.

>> > Sorry, I think that's awkward and not at all user friendly.
>> 
>> It's not user friendly to create unplayable files.
>
> I can't see how that could happen.

What????  It *HAS* happened.  There are lots of MPEG-TS files missing
PSI created by broken DVB tools.

> I also see my patch fixing a more generic issue.  There could be a
> format that does have a notion of "programs" but where not all streams
> are part of a "program".

That's a separate discussion.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list