diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-07 19:53:17 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-07 19:53:17 +0200 |
commit | 6c804046b36cdb413a78e2cb3225f9980c5842dd (patch) | |
tree | d3ea693a5a120f0078eb6a6703f7a4e4e578b776 /m4 | |
parent | 05ad91eb1a7b46c3e0938aa8e9f0b6e23193691a (diff) | |
download | xine-lib-6c804046b36cdb413a78e2cb3225f9980c5842dd.tar.gz xine-lib-6c804046b36cdb413a78e2cb3225f9980c5842dd.tar.bz2 |
Optimise input_vcd: don't use a static-sized filelist array, and use asprintf where appropriate.
Instead of creating a 100-elements filelist array, with each element
containing a 256 bytes string, make it dynamic, create it when
get_autoplay_list is called, free it if it was present before, and use
asprintf() for creating the entries.
This not only reduces the complexity of the code, but also reduces the
size of the input class object (which in turn reduce memory usage),
but also avoids memory leaks that the previous code certainly had. The
total memory used even with a full list of files should also be
drastically reduced.
Also, use asprintf while filling the mrls data, rather than allocating
a 1 KiB array on the stack, and use it as temporary.
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions