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.
|
|
(transplanted from 332f543689ebef22ef38e052c437d6998ac8fe66)
--HG--
extra : transplant_source : 3/T6%89%EB%EF%22%EF8%E0R%C47%D6%99%8A%C8%FEf
|
|
(transplanted from e9e85d6bcc7e9aafb1dc019f3505de2dafe940bf)
--HG--
extra : transplant_source : %E9%E8%5Dk%CC%7E%9A%AF%B1%DC%01%9F5%05%DE-%AF%E9%40%BF
|
|
(transplanted from 3640d3cbe551f96df932b7d6218b071b910a237b)
--HG--
extra : transplant_source : 6%40%D3%CB%E5Q%F9m%F92%B7%D6%21%8B%07%1B%91%0A%23%7B
|
|
size of an item for the number of items.
(transplanted from efc9d92af3d7927cbf5534b5612fd98af541ff95)
--HG--
extra : transplant_source : %EF%C9%D9%2A%F3%D7%92%7C%BFU4%B5a/%D9%8A%F5A%FF%95
|
|
elements by the size of the single element.
(transplanted from 512894f517c423fed0cadeca0d46c6d909403106)
--HG--
extra : transplant_source : Q%28%94%F5%17%C4%23%FE%D0%CA%DE%CA%0DF%C6%D9%09%401%06
|
|
(transplanted from 47f7f33b32805da6e8f58513c38e01dc6a595fb8)
--HG--
extra : transplant_source : G%F7%F3%3B2%80%5D%A6%E8%F5%85%13%C3%8E%01%DCjY_%B8
|
|
--HG--
extra : transplant_source : %80%19%15%EAL%B3%1EAl%11RF%E7%BB%7FHa%2A%C5%1A
|
|
|
|
On some m4a files I get a divide by zero.
bytes_per_packet in this case is zero. I'm not sure what the real problem is
but skipping the assignment in that case works fine.
|
|
|
|
|
|
|
|
put the volume to zero.
|
|
|
|
|
|
|