Commit Graph

35339 Commits

Author SHA1 Message Date
Anton Khirnov
a43283b6f4 wavdec: check size before reading the data, not after. 2012-10-16 18:52:21 +02:00
Anton Khirnov
79922d7237 wav: do not fail on empty INFO tags
Fixes Bug 379

CC: libav-stable@libav.org
2012-10-16 18:52:14 +02:00
Anton Khirnov
31c54711cc lavf: split wav muxer and demuxer into separate files. 2012-10-16 18:52:07 +02:00
Victor Vasiliev
58b619c8a2 wav muxer: write metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:51:56 +02:00
Victor Vasiliev
0bca0283cc riff: do not write empty INFO tags
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:51:16 +02:00
Victor Vasiliev
71e92414bf lavf: move RIFF INFO tag writing from avienc to riff
It will be useful in the wav muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:50:36 +02:00
Anton Khirnov
a119c64e38 avconv: fix disabling auto mappings with -map_metadata
CC: libav-stable@libav.org
2012-10-16 18:49:59 +02:00
Rafaël Carré
a25d912dca avcodec_encode_audio(): fix invalid free
Since 2bc0de385, AVFrame needs to be initialized
before calling avcodec_get_frame_defaults().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:49:31 +02:00
Christian Schmidt
4a7429203a pcm-mpeg: correct bitrate calculation
Bitrate calculation is off since the bluray spec always specifies
an even number of coded channels. This was honored in the decoder,
but not for bitrate calculation.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-16 16:03:03 +02:00
Luca Barbato
9a978b334b ffv1: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-10-16 15:45:55 +02:00
Diego Biurrun
c0a6cac292 fate: Add rangecoder test 2012-10-16 15:45:55 +02:00
Mans Rullgard
1fbaabefc4 network: #include stdint.h in network.h
This header uses various types provided by stdint.h without
explicitly including it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-16 14:45:29 +01:00
Luca Barbato
21de6ba5c1 nut: export codec_tag provided by rawvideo
Raw audio does not provide valid audio tags while rawvideo does.
The fate refs have to be updated because it undoes the previous tag
change.
2012-10-16 15:26:31 +02:00
Mans Rullgard
3b20eb25e7 avserver: move avserver-specific code from ffmdec.c to avserver.c
This way avserver only depends on the data structures of the ffm
demuxer, which it already does, and not also on private functions
being exported by the library.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-16 14:20:05 +01:00
Mans Rullgard
07b3790d36 build: simplify linking tools with cmdutils.o
This avoids repeating cmdutils.o in both the prerequisites and
the link command.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 22:28:07 +01:00
Mans Rullgard
bf868c4a9b tiny_psnr: fix range calculation for sample size of 32 bits
For a sample size of 32 bits, the shift would overflow producing
undefined results.  Incidentally, in the only test currently using
32-bit samples, the output matches the reference exactly on most
systems meaning the bad 'max' value is never used.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 21:41:25 +01:00
Mans Rullgard
3dc06b6972 tiny_psnr: check for specified sample size less than 1
A zero or negative sample size is impossible and should be
reported as an error.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 21:40:18 +01:00
Mans Rullgard
099294577c fate: improve md5sum utility selection
The 'md5sum' command is used with the -b flag so the presence test
must also use this flag.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 21:40:08 +01:00
Diego Biurrun
f1be514540 rangecoder-test: Drop timer output that clutters stderr 2012-10-15 21:16:36 +02:00
Diego Biurrun
c1fcfdec75 rangecoder-test: Return in case of an error 2012-10-15 21:15:17 +02:00
Mans Rullgard
84e65c763d build: simplify enabling of compat objects
Add a configure function to pull in a compat object and set up
redirects in one operation.  This avoids duplicating conditions
across configure and makefiles.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 17:46:19 +01:00
Mans Rullgard
66a1ccd746 configure: simplify argument handling in check_ld
Use the existing filter functions instead of open-coding the
separation of general flags and libraries.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 17:46:18 +01:00
Mans Rullgard
4c995fafd8 configure: simplify get_version() function
awk alone can do this, no need for grep.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 17:46:18 +01:00
Luca Barbato
0fbb62a8e6 build: support asan and tsan toolchain shortcuts 2012-10-15 18:25:35 +02:00
Diego Biurrun
7e68c91e24 rmdec: Move SIPR code shared with Matroska demuxer to a separate file 2012-10-15 13:34:07 +02:00
Mans Rullgard
95cd815c36 swscale: try to use mmap only if available
Some systems, e.g. Minix, have sys/mman.h defining MAP_ANONYMOUS without
providing (working) mmap and friends.  The mmx filter generation code
checks only for MAP_ANONYMOUS, not for availability of mmap itself which
leads to build errors on aforementioned systems.

This changes the conditional compilation to use mmap only if all the
required functions are available.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 02:39:49 +01:00
Mans Rullgard
e98b02de5f configure: check for mprotect
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 02:39:49 +01:00
Justin Ruggles
f9d732c264 wmapro: use planar sample format 2012-10-14 16:48:23 -04:00
Justin Ruggles
2725ce7c7c wmalossless: output in planar sample format 2012-10-14 16:48:23 -04:00
Justin Ruggles
7ebfe5b44a wmadec: use float planar sample format output 2012-10-14 16:48:23 -04:00
Justin Ruggles
977eb7d567 shorten: use planar sample format 2012-10-14 16:48:22 -04:00
Justin Ruggles
8441909f49 lavc: update documentation for AVFrame.extended_data 2012-10-14 15:00:45 -04:00
Diego Biurrun
7638f0b2fe avutil: Do not make ff_ symbols globally visible. 2012-10-13 20:01:56 +02:00
Diego Biurrun
52d113ee06 avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()
Functions used across libraries should have avpriv_ and not ff_ prefixes.
2012-10-13 19:59:20 +02:00
Mans Rullgard
b6f8d635f2 build: tms470: work around glibc math.h problems
The glibc definitions of INFINITY and NAN do not work with the
tms470 compiler, nor do our usual fallbacks.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 18:21:36 +01:00
Mans Rullgard
5ab432fa35 configure: improve tms470 compiler usage with glibc
Apply flags to work around glibc quirks only if glibc is detected,
and add a few more such flags.

Do not mess with as/ld settings in probe_cc.  This is not the
proper place.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 18:21:36 +01:00
Mans Rullgard
b5198a2637 configure: tms470: add mapping for -mfpu=vfpv3-d16 flag
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 18:21:36 +01:00
Mans Rullgard
741a8b724e configure: recognise Minix as OS
No special setup is required for Minix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 14:05:55 +01:00
Mans Rullgard
ac17ccf73a configure: work around bug in ash shell
The ash 'test' builtin misbehaves if the first operand of a binary
operator looks like a unary operator.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 14:05:55 +01:00
Mans Rullgard
74c39bc682 eval-test: make table static const
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 11:39:25 +01:00
Justin Ruggles
10e645e9cb lavr: handle clipping in the float to s32 conversion
We cannot clip to INT_MAX because that value cannot be exactly
represented by a float value and ends up overflowing during conversion
anyway. We need to use a slightly smaller float value, which ends up
with slightly inaccurate results for samples which clip or nearly clip,
but it is close enough. Using doubles as intermediates in the conversion
would be more accurate, but it takes about twice as much time.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-13 12:34:34 +02:00
Luca Barbato
92281850a2 nut: support pcm codecs not mapped in avi
The native tags will be used when available.
2012-10-13 12:33:18 +02:00
Luca Barbato
1bd442c276 nut: prioritize native tags
Use native tags instead of avi ones, simplifies a lot raw video codecs
handling.
2012-10-13 12:33:18 +02:00
Mashiat Sarker Shakkhar
5d2be71b9e vc1: Use codec ID from AVCodecContext while parsing frame header
This fixes a segfault with samples that I have (both of them MPEG-TS). Looks like
avctx->codec is not being set during parsing.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-10-13 08:33:07 +02:00
Justin Ruggles
6304f78edf avplay: support mid-stream sample rate changes
Resample to the rate that was configured in SDL.
2012-10-13 00:19:00 -04:00
Justin Ruggles
f5962229bf avplay: use audio parameters from the decoded frame instead of AVCodecContext 2012-10-13 00:18:48 -04:00
Justin Ruggles
61d5313d94 dca: allocate a secondary buffer for extra channels when downmixing
The output AVFrame buffer only has data for the downmix channels.
Fixes a segfault when decoding dca with request_channels == 2.
2012-10-13 00:07:10 -04:00
Mans Rullgard
a77f01c725 configure: use utilities from /usr/xpg4/bin if it exists
Solaris defaults to non-standard utilities (grep, sed, ...) with
proper ones being in /usr/xpg4/bin.  Prefixing PATH with this
directory when it exists ensures we get correct variants.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 23:57:01 +01:00
Mans Rullgard
0daac647af avstring-test: fix memory leaks
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 23:51:12 +01:00
Mans Rullgard
0a7005bebd rtpdec_xiph: fix function return type
parse_packed_headers() returns either zero or a negative error code
so its return type must be signed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 22:21:10 +01:00