[FFmpeg-devel] [PATCH] options to set stream id (custom TS pid)

Baptiste Coudurier baptiste.coudurier
Thu May 13 20:27:48 CEST 2010


On 05/13/2010 11:15 AM, Mike Scheutzow wrote:
> Baptiste Coudurier wrote:
>> Hey guys,
>>
>> $subject.
>
> I think this patch will break any application where the developer
> assigned the stream index to AVStream.id. I'm sure many developers
> followed the example of ffmpeg.c.
>
> MAX_STREAMS is 20, so one approach that should be mostly
> backward-compatible would be to use AVStream.id as a pid only if the
> value is >= 20.


Well, indeed, I see the problem.

MAX_STREAMS will be 100 with the next bump though.
PIDS < 16 are reserved, how many users place 16 streams in an output file ?
Code would fail, and force applications to update the code (not friendly 
but efficient IMHO), or code could print an error but not fail.

So, I think that checking for st->id >= 16 is reasonable. Is that ok ?

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list