Revision 553febf4d8d473b7849eda2735ea77bbcb4f7c80 authored by Filip Roséen on 20 February 2016, 21:41:07 UTC, committed by Jean-Baptiste Kempf on 05 March 2016, 21:15:12 UTC
Manually managing memory comes at a cost of both maintainability (in
terms of safety) and performance, as such I have replaced `p_indexes`
with a `std::vector` with equivalent functionality.

Three helper member-functions have been introduced in order to clean up
the usage of the functionality, as well as removal of two now obsolete
member-variables. A `typedef` has also been introduced to aid future
development.

The changes in `mkv.cpp` are due to the fact that it needs access to the
indexes present in `matroska_segment_c`; this should be refactored away
in the future.

Also fixed a bug where you would access index out of bounds if there
are no known indexes.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
1 parent 881299b
History
File Mode Size
test
.gitignore -rw-r--r-- 8 bytes
Makefile.am -rw-r--r-- 463 bytes
asprintf.c -rw-r--r-- 1.3 KB
atof.c -rw-r--r-- 1.2 KB
atoll.c -rw-r--r-- 1.2 KB
dirfd.c -rw-r--r-- 1.3 KB
fdopendir.c -rw-r--r-- 2.3 KB
ffsll.c -rw-r--r-- 1.3 KB
flockfile.c -rw-r--r-- 2.0 KB
freeaddrinfo.c -rw-r--r-- 1.6 KB
fsync.c -rw-r--r-- 1.3 KB
gai_strerror.c -rw-r--r-- 3.2 KB
getdelim.c -rw-r--r-- 2.0 KB
getpid.c -rw-r--r-- 1.3 KB
gettimeofday.c -rw-r--r-- 1.9 KB
gmtime_r.c -rw-r--r-- 3.1 KB
inet_pton.c -rw-r--r-- 2.0 KB
lldiv.c -rw-r--r-- 1.2 KB
localtime_r.c -rw-r--r-- 1.7 KB
nrand48.c -rw-r--r-- 1.9 KB
poll.c -rw-r--r-- 7.6 KB
posix_memalign.c -rw-r--r-- 1.8 KB
recvmsg.c -rw-r--r-- 2.1 KB
rewind.c -rw-r--r-- 1.2 KB
sendmsg.c -rw-r--r-- 2.0 KB
setenv.c -rw-r--r-- 1.7 KB
strcasecmp.c -rw-r--r-- 1.5 KB
strcasestr.c -rw-r--r-- 1.8 KB
strdup.c -rw-r--r-- 1.3 KB
strlcpy.c -rw-r--r-- 1.7 KB
strndup.c -rw-r--r-- 1.3 KB
strnlen.c -rw-r--r-- 1.3 KB
strnstr.c -rw-r--r-- 1.6 KB
strsep.c -rw-r--r-- 1.5 KB
strtof.c -rw-r--r-- 1.2 KB
strtok_r.c -rw-r--r-- 1.7 KB
strtoll.c -rw-r--r-- 2.7 KB
strverscmp.c -rw-r--r-- 3.0 KB
swab.c -rw-r--r-- 1.4 KB
tdestroy.c -rw-r--r-- 6.1 KB
timegm.c -rw-r--r-- 2.2 KB
timespec_get.c -rw-r--r-- 1.8 KB
vasprintf.c -rw-r--r-- 1.7 KB

back to top