Age | Commit message (Collapse) | Author |
|
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.
|
|
Allocate all the frames, the extra info data and the audio and video
content areas as one big memory area each.
This also remove some use of xine_xmalloc().
|
|
|
|
Instead of duplicating twice the http_proxy environment variable
value, do so only once, avoid a strlen() call when checking if the
string is not empty, remove the http_proxy variable entirely, don't
free the duplicated string as that's what it's used.
|
|
|
|
Instead of creating strings through a series os string copy and
concatenations, use directly the appropriate printf-like function.
|
|
Whenever an allocated memory area is immediately filled in with a
string through strcpy() or strncpy(), replace the calls with the
appropriate strn?dup().
|
|
Instead of calling sprintf or snprintf with a "%s" format string, use
the proper strcpy, strncpy, strdup or strndup function.
|
|
There is no need to check if a pointer is not NULL before freeing it,
so just call free() during MRL_FREE.
During duplication, always prefer freeing and recreating to
reallocating, as that would probably take more time than would
actually be needed to allocate a new memory area. Also, most likely
the duplication will happen on a new instance.
|
|
Using asprintf() instead of malloc() + sprintf() reduces the lines of
code in xine-lib (moving the allocation to the C library or asprintf
replacement), makes it safer to access the string and can also improve
performance whenever the value returned by a function was used as
parameter, as before it had to run the function twice in almost every
case (once for strlen(), once for sprintf()).
|
|
|
|
The xine_xmalloc() function is going to be deprecated, as its
behaviour is rarely needed as such, and it's thus misused.
With this, almost all uses of xine_xmalloc() with static size (for
instance the value returned by sizeof()) or with a size that is
guaranteed not to be zero (like strlen()+1) are replaced with calls to
either calloc(1, ...) or malloc().
malloc() is used whenever the allocated memory is going to be
immediately overwritten, while calloc() is used in every other case,
as it sets the whole memory area to zero.
--HG--
extra : transplant_source : %8F%98%EC%02%1E%83%F0s%06X%83C%205Y%80%B12%CC%E1
|
|
|
|
When we're including xine/attributes.h but we're not building xine,
define the support for particular attributes based on the compiler and
its version. This way semantic information is maintained outside
xine's build (such as deprecated functions).
|
|
Functions and data structures that are not exported and are only ever
used in the same unit they are defined should be marked static to
improve compiler's ability to optimise them.
This applies to xine_dispose_internal() function for xine-lib, the
extended_to_int() function in the AIFF demuxer, the bandwidths array
in QuickTime demuxer, the wc_pal_lookup table in the WC3 movie
demuxer, and the rm_header and pnm_data_header arrays in pnm input
plugin.
|
|
The xine_check.h header is not currently installed and the symbols are
not exported, their are only ever used in the same unit they are
defined.
|
|
|
|
rather than just checking for GCC 3.
|
|
|
|
used for legacy flac.
|
|
|
|
|
|
|
|
generic one to access them.
|
|
|
|
|
|
Occasionally when playing h264-encoded files, green blocks will appear
at the edges of the frame, and get smeared around (following the motion
vectors, of course). This bug has existing in Xine for well over a
year, and I keep hoping it will be fixed, but it never was.
I recently learned that gstreamer had a similar problem and it was fixed
last year. With this as a hint, I found
http://bugzilla.gnome.org/show_bug.cgi?id=364139 and the patch attached
to that bug.
I've adapted that patch to xine, and it is attached. I have compared
clips before and after applying this patch, and in all cases the green
artifacts have gone away, and I have seen no negative side effects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2 series.
|
|
This uses the adapter names reported by the X 2D graphics driver.
(Transplanted from 8c06e053c6dbb2f31c004f6eb615ebbf3f67d667)
|
|
(Transplanted from f03669a2395d97a3e40615db1089af084a69d299)
|
|
(Transplanted from 574fefcee8b1b6456fd8dc9c06191cf4622f07eb)
|
|
(Transplanted from 378582ca7b95e634cb0b04b714df0170b60688b3)
|
|
Also, a few trivial constness cleanups.
(Transplanted from 3ede88232fd45bca91eb0b1cfa2d70de040cadb8)
|
|
- Removed display in open_plugin();
- Converted adaptor_{info,num} in xvmc_class_t into locals in open_plugin().
Also, a few trivial constness cleanups.
(Not fully tested; XvMC doesn't work for me.
(Transplanted from 234c8a2131e9a19d52414733dfc2bf93beb80af0)
|
|
Also, a few trivial constness cleanups.
(Transplanted from 83c85e349d6d09b06faa6d34c090038d7bd1ac81)
|
|
(Transplanted from 39cc466bebc1f98bb20411351fd4c671ad1e190d)
|
|
(Transplanted from ec0d80a280e90494306023b66e5917209b2c4155)
|
|
(Transplanted from b2dd043f187b6332248fd58410ffebf7e7727aeb)
|
|
(Transplanted from 649b3a6f755edaed6edc44e95b13cf2a84d19a57)
|
|
The attached patch allows to specify the Xv port to use (needed with some
nvidia twinview configurations).
(Transplanted from 307aa599ccb0e496638738accbdb85b493904e18)
|
|
This overrides the normal content/extension detection, but can be overridden
by the user.
This is an input plugin API extension; ABI is unchanged.
The version is not bumped (we can't bump it due to 1.2).
|
|
text/plain is specifically filtered out because it could cause lots of false
positives, at least with http; web servers tend to default to text/plain for
unknown types.
|
|
This is an input plugin API extension; ABI is unchanged.
The version is not bumped (we can't bump it due to 1.2).
|
|
"Old" is still the default.
|