Commit Graph

23 Commits

Author SHA1 Message Date
Uoti Urpala d72541b75c bstr.[ch]: add new files for struct bstr related functionality
Move "struct bstr" definition from ebml.h to its own header and add
some utility functions/macros. Change length field type from int to
size_t and adjust using code accordingly.

Partially based on a patch from Anton Khirnov.
2010-05-20 23:50:18 +03:00
Uoti Urpala e74708f619 Merge svn changes up to r30748 2010-03-10 01:50:55 +02:00
diego b63759b175 Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-26 15:01:37 +00:00
Uoti Urpala db41501f23 demux_mkv: use new EBML parser to read Audio element 2010-01-27 14:26:48 +02:00
Uoti Urpala a07cfb35d3 demux_mkv: remove pointless 'long double' use
There was no remaining reason to use this type. The variables were
assigned values with plain double precision anyway.
2010-01-27 14:26:48 +02:00
Uoti Urpala 8b0726b28a demux_mkv: use new EBML parser for file header 2010-01-27 14:26:48 +02:00
Uoti Urpala 5f631d1c08 matroska: add new parsing code
Add a new EBML parser implementation that should allow significant
improvements to the Matroska demuxer. The new parsing code is not
actually used yet by the demuxer. The only changes to existing code in
this commit are to generate the MATROSKA_ID_* / EBML_ID_* macro
definitions from the new implementation and to rename some of them
(the new implementation uses names matching the official Matroska spec).

The main parser implementation is added in ebml.c. There are two new
generated files, ebml_defs.c and ebml_types.h, that contain
definitions of EBML elements. Those are generated by the new script
TOOLS/matroska.py. There's a new Makefile target "generated_ebml" that
run the script to refresh the content of the generated files.
2010-01-27 14:26:43 +02:00
Uoti Urpala 9fe4f64782 demux_mkv.c, ebml.c: Reformat to K&R style 2009-12-29 21:58:30 +02:00
diego f077569dff Add standard license header to all files in libmpdemux.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-08 21:51:13 +00:00
diego e085bc8dcf Add explicit location for headers from the stream/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 18:36:36 +00:00
reimar 18004d2d98 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21523 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-07 11:58:07 +00:00
reimar ef393a0650 Use av_int2flt/av_int2dbl to read float values. This is simpler and more
correct since it also works for int endianness != float endianness.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21404 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-30 17:55:00 +00:00
diego cac6c0eea2 Remove bswap.h, use libavutil/bswap.h instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21388 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-29 15:02:45 +00:00
reimar 01755ed66a Remove long double reading code, long double was never used AFAICT and
is gone from the specification since a long time due to portability issues.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21360 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-28 18:34:08 +00:00
rtogni b6fb797e3c Protect SIZE_MAX use
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18672 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-09 23:19:13 +00:00
rtogni 9da9317579 Fix potential integer overflows in memory allocation.
Patch by Rich and me


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18559 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-04 22:41:27 +00:00
diego bc30e8e673 Unconditionally compile the Matroska demuxer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18405 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-05-08 21:41:15 +00:00
reimar 2d7dbaa10f (hopefully) fixing remaining float endianness problems
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15977 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-07-13 17:24:42 +00:00
mosu 3987f2d260 Fix for gcc 4 and strict-aliasing. Patch by Uoti A Urpala ( urpala () cc ! helsinki ! fi ).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15960 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-07-10 18:31:13 +00:00
reimar 31653cb3f7 100l, no endian conversion on floats!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14491 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-13 21:56:06 +00:00
mosu 1642ed2fc3 Cosmetics: fix some compiler warnings.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13132 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-08-25 07:52:52 +00:00
rfelker 4ebc221760 more nonsense lvalue casts, at least these aren't quite as stupid
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12377 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-05-01 18:34:23 +00:00
mosu d6fad182c2 Added the new C based Matroska demuxer by Aurelien Jacobs.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11808 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-01-19 19:16:10 +00:00