[FFmpeg-devel] [PATCH 2/2] lavf/concat: add max_opened_files option.

Michael Niedermayer michaelni at gmx.at
Sun Jul 28 20:40:21 CEST 2013


On Sun, Jul 21, 2013 at 04:14:24PM +0200, Nicolas George wrote:
> Fix part of trac ticket #2801.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  doc/protocols.texi   |    9 ++++
>  libavformat/concat.c |  144 +++++++++++++++++++++++++++++++++++++++++---------
>  2 files changed, 129 insertions(+), 24 deletions(-)

do you expect the open file limit to be large/huge ?
also the current code seems to be O(n) already in concat_seek()
so i wonder why you are using a double linked list instead of just
iterating over the (open) elements and closing the oldest based on
some use "timestamp"

also LRU isnt optimal though this is probably not worth optimizing
but if someone wants
after the size scan most likely the first few files will be read not
the last as would be open with LRU
and when several non interleaved streams are read also LRU isnt
optimal, files for which the next file is open and files for which this
is not so should have quite different statistics. (they could be
placed in seperate LRU lists to protect the reading head for each
stream and possibly a reading head for an index)
but again i dont think this is worth trying to optimize for
ATM/in this patch

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130728/53f2b0e8/attachment.asc>


More information about the ffmpeg-devel mailing list