[FFmpeg-devel] [RFC] av_tree enumeration

Måns Rullgård mans
Sun Nov 15 04:33:17 CET 2009


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> On date Saturday 2009-11-14 16:10:38 +0000, M?ns Rullg?rd encoded:
>> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
>> > I'll go for a sorted list of registered element, which then can be
>> > bin-searched.
>> 
>> Don't.  The order of registration should be preserved, or strange
>> things will happen.
>
> Could you explain why?

In some cases there are multiple codec instances using the same
codec_id.  A linear search in order of registration will always return
the one first registered.  Sorting them will make it somewhat
unpredictable.

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



More information about the ffmpeg-devel mailing list