Age | Commit message (Collapse) | Author |
|
|
|
Hi, I've been tracking down a very odd bug this afternoon. As it turns
out it is caused by enabling xine's mmap() support for the input_file.c.
I'm running 32 bit linux 2.6.21. The file in question is 0x10e4da000
bytes long (you can probably guess what kind of bug this is by now :)
Anyway, the issue stems from the definition of mmap():
void *mmap(void *start, size_t length, int prot, int flags, int fd,
off_t offset);
compare this to the definition of st_size in struct stat:
off_t st_size; /* total size, in bytes */
On my machine (in input_file.c) sizeof(size_t) ==4, whilst
sizeof(off_t) == 8. However the compiler doesn't generate a warning
when the following is done in xine's code:
if ( (this->mmap_base = mmap(NULL, sbuf.st_size, PROT_READ,
MAP_SHARED, this->fh, 0)) != (void*)-1
So it silently truncates the upper part of the length. Obviously you
cannot mmap() a file that large into (32 bit) memory anyway, but as it turns
out, mmapping() 0xe4da000 succeeds, which causes... problems.
The patch (against xine-lib 1.1.6) does two things:
* Check that the length will not be truncated, while still allowing
for mmap()s of large files under 64 bit OSes.
* A correctness fix: if mmap() fails, this->mmap_base will be set to
0xffffffff. Later on when the file is closed, this means it was
attempting to do munmap(0xffffffff).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--HG--
rename : doc/faq/faq.sgml => doc/faq/faq.docbook
|
|
|
|
|
|
|
|
|
|
|
|
from Hg.
|
|
|
|
|
|
|
|
|
|
variable.
|
|
|
|
|
|
|
|
|
|
|
|
--HG--
rename : doc/hackersguide/hackersguide.sgml => doc/hackersguide/hackersguide.docbook
rename : doc/hackersguide/internals.sgml => doc/hackersguide/internals.docbook
rename : doc/hackersguide/intro.sgml => doc/hackersguide/intro.docbook
rename : doc/hackersguide/library.sgml => doc/hackersguide/library.docbook
rename : doc/hackersguide/output.sgml => doc/hackersguide/output.docbook
rename : doc/hackersguide/overview.sgml => doc/hackersguide/overview.docbook
rename : doc/hackersguide/stream.sgml => doc/hackersguide/stream.docbook
|
|
This requires renaming po/libxine1.pot -> po/libxine2.pot.
--HG--
rename : po/libxine1.pot => po/libxine2.pot
|
|
|
|
--HG--
rename : debian/libxine-dev.install => debian/libxine2-dev.install
|
|
|
|
--HG--
rename : debian/libxine1-doc.docs => debian/libxine2-doc.docs
rename : debian/libxine1-doc.manpages => debian/libxine2-doc.manpages
|
|
|
|
|
|
suffix rules works.
|
|
|
|
|
|
|
|
same 'xiph' plugin.
As the three decoders requires Ogg support, and requires an Ogg demuxer to play, enabling any one of them will then enable the ogg demuxer.
The Ogg demuxer, on its own, needs to know which of the three formats are enabled, or it will not be able to properly decode them.
With this change, only one plugin will need to load and know about Xiph formats and libraries.
--HG--
rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
rename : src/libxineadec/xine_speex_decoder.c => src/combined/xine_speex_decoder.c
rename : src/libxinevdec/xine_theora_decoder.c => src/combined/xine_theora_decoder.c
rename : src/libxineadec/xine_vorbis_decoder.c => src/combined/xine_vorbis_decoder.c
|
|
|
|
misfire and report a good file as unplayable.
|
|
|
|
external libmad.
|
|
--HG--
rename : src/libxineadec/gsm610/Makefile.am => contrib/gsm610/Makefile.am
rename : src/libxineadec/gsm610/add.c => contrib/gsm610/add.c
rename : src/libxineadec/gsm610/decode.c => contrib/gsm610/decode.c
rename : src/libxineadec/gsm610/gsm.h => contrib/gsm610/gsm.h
rename : src/libxineadec/gsm610/gsm_config.h => contrib/gsm610/gsm_config.h
rename : src/libxineadec/gsm610/gsm_create.c => contrib/gsm610/gsm_create.c
rename : src/libxineadec/gsm610/gsm_decode.c => contrib/gsm610/gsm_decode.c
rename : src/libxineadec/gsm610/gsm_destroy.c => contrib/gsm610/gsm_destroy.c
rename : src/libxineadec/gsm610/long_term.c => contrib/gsm610/long_term.c
rename : src/libxineadec/gsm610/lpc.c => contrib/gsm610/lpc.c
rename : src/libxineadec/gsm610/private.h => contrib/gsm610/private.h
rename : src/libxineadec/gsm610/proto.h => contrib/gsm610/proto.h
rename : src/libxineadec/gsm610/rpe.c => contrib/gsm610/rpe.c
rename : src/libxineadec/gsm610/short_term.c => contrib/gsm610/short_term.c
rename : src/libxineadec/gsm610/table.c => contrib/gsm610/table.c
rename : src/libxineadec/gsm610/unproto.h => contrib/gsm610/unproto.h
|
|
This way binary distributions can make it optional, as it requires quite a bit of CPU time during initialisation, even for audio files that nothing have to do with modplug.
|
|
The attached patch fixes a problem with embedded references in recent
versions of quicktime's movie formats.
Apparently there is an additional atom (RMRA) before the RMDA atom: it
works like a container for all subsequent atoms, so it can be safely
skipped.
You can test yourself what I'm saying by watching some trailers at
apple.com (http://www.apple.com/trailers).
--
Regards,
Claudio Ciccani
klan@users.sf.net
http://directfb.org
http://sf.net/projects/php-directfb
|
|
|