Commit Graph

39795 Commits

Author SHA1 Message Date
Michael Niedermayer
2a7063de54 wmalosslessdec: fix a get_bits(0) in decode_ac_filter
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 14:50:48 +02:00
Michael Niedermayer
a0abefb0af wmalosslessdec: make mclms arrays big enough for whats written into them.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 14:49:51 +02:00
Michael Niedermayer
d442c4462a wmalosslessdec: Make arrays WMALL_BLOCK_MAX_SIZE big and check samples_per_frame.
The samples_per_frame check is ported from wmaprodec.c

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 13:35:29 +02:00
Michael Niedermayer
9166f483c5 wmaprodec: check min_samples_per_subframe
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 13:13:48 +02:00
Michael Niedermayer
b28c678ba8 wmaprodec; fix get_bits(0) case.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 12:03:31 +02:00
Michael Niedermayer
97a5addfcf wmaprodec: check num_vec_coeffs for validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 11:46:23 +02:00
Michael Niedermayer
52ec269573 lavf: print with debug level the byte positions before and after find_stream_info
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 11:46:23 +02:00
Michael Niedermayer
cca9528524 mp3on4: allocate a large enough frame.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 00:24:38 +02:00
Michael Niedermayer
c41ac87047 avidec: update size when packet is shrunk
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 00:24:38 +02:00
Clément Bœsch
3f80546d75 lavfi/drawbox: fix width displayed in place of x. 2012-04-13 23:15:54 +02:00
Michael Niedermayer
72b9537d88 dfa: Fix out of array write in decode_dds1()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 22:59:33 +02:00
Michael Niedermayer
d1c95d2ce3 dfa: fix out of array write in decode_wdlt()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 22:58:54 +02:00
Michael Niedermayer
367d9b2957 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: K&R formatting cosmetics (part II)
  tiffdec: Add a malloc check and refactor another.
  faxcompr: Check malloc results and unify return path
  configure: escape colons in values written to config.fate
  ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE
  matroska: Fix leaking memory allocated for laces.
  pthread: Fix crash due to fctx->delaying not being cleared.
  vp3: Assert on invalid filter_limit values.
  h264: fix 10bit biweight functions after recent x86inc.asm fixes.
  ffv1: Fix size mismatch in encode_line.
  movenc: Remove a dead initialization
  git-howto: Explain how to avoid Windows line endings in git checkouts.
  build: Move all arch OBJS declarations into arch subdirectory Makefiles.

Conflicts:
	configure
	libavcodec/vp3.c
	libavformat/matroskadec.c
	libavutil/Makefile
	libswscale/Makefile
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 21:50:37 +02:00
Diego Biurrun
ef0ee7f657 swscale: K&R formatting cosmetics (part II)
Also adjust some comments including wording and typo fixes.
2012-04-13 19:22:00 +02:00
Alex Converse
90a4306007 tiffdec: Add a malloc check and refactor another. 2012-04-13 09:49:13 -07:00
Alex Converse
99a335299f faxcompr: Check malloc results and unify return path 2012-04-13 09:49:13 -07:00
Michael Niedermayer
62e5ef95ca av_image_alloc: Align the width to 8 when align >= 8.
This allows simd optimized routines to work in steps of 8 pixels
without going over the linesize. (this matters for yuv->rgb24 for example)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 18:40:17 +02:00
Michael Niedermayer
41a052a6ba cmdutils: fix "oswr may be used uninitialized" warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 18:38:10 +02:00
Michael Niedermayer
2ec8789eb8 avpicture_layout: use a endian independant format for the palette.
This should fix the failing fate PAL8 tests.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 18:21:51 +02:00
Mans Rullgard
6555acad10 configure: escape colons in values written to config.fate
The fields in config.fate are colon-separated so any colons
within the fields should be escaped to prevent confusion.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-13 13:22:37 +01:00
Michael Niedermayer
84d74610f9 mov: zero sc->pb in mov_read_close()
Its bad to free things without zeroing them.
This fixes a potential issue when mov_read_close() would be called twice.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 12:09:32 +02:00
Dale Curtis
a6b3e6d0b4 mov: Fix memory leaks on aborted header parsing.
If mov_read_header exits under error, the memory allocated is
not freed.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 11:59:27 +02:00
Michael Niedermayer
ab3fcd93fd mov: zero extradata_size on deallocation of extradata.
This prevents the possibility of extradata and its size becoming desynced.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 11:52:19 +02:00
Dale Curtis
b5ada68ead matroska: Fix leaking memory allocated for laces.
During error conditions matroska_parse_block may exit without
freeing the memory allocated for laces.

Found via valgrind: http://pastebin.com/E54k8QFU

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 11:43:10 +02:00
Dale Curtis
fd165a0b31 mov: Fix harmless OOB read.
Convert key_off initialize to use the same sc->keyframe_count as
used elsewhere in the function.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 11:28:32 +02:00
Dale Curtis
a9d114dc8a pthread: Fix crash due to fctx->delaying not being cleared.
corrects invalid return when avpkt->size == 0.

Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0

Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogm

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 11:10:38 +02:00
Justin Ruggles
de7f22ab0c ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE
Fixes ac3-encode and eac3-encode FATE test failures with SSE2 disabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:33:04 -07:00
Dale Curtis
3116858853 matroska: Fix leaking memory allocated for laces.
During error conditions matroska_parse_block may exit without
freeing the memory allocated for laces.

Found via valgrind: http://pastebin.com/E54k8QFU

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:32:01 -07:00
Dale Curtis
97ae370078 pthread: Fix crash due to fctx->delaying not being cleared.
Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0

Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogm

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:32:01 -07:00
Dale Curtis
27c2fb0f72 vp3: Assert on invalid filter_limit values.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-12 21:31:55 -07:00
Ronald S. Bultje
76538d7a78 h264: fix 10bit biweight functions after recent x86inc.asm fixes.
This should have been updated in the x86inc.asm update, but was
accidently forgotten.
2012-04-12 21:13:57 -07:00
Alex Converse
2b8374e920 ffv1: Fix size mismatch in encode_line. 2012-04-12 18:34:45 -07:00
Alex Converse
73b7437f1d movenc: Remove a dead initialization 2012-04-12 18:34:45 -07:00
Dale Curtis
e9dc616472 vp3: Assert on invalid filter_limit values.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 02:12:22 +02:00
Michael Niedermayer
bd3ea31797 ffmpeg: Compensate non monotonicity errors in the audio TSs.
Audio timestamps are passed through by default and when the input
doesnt contain clean timestamps this can lead to non monotonicity
errors. (rounding to a course timebase can cause this too)

Print a warning when the errors in the timestamps are large

Fixes Ticket1167 (regression since timestamps are passed through)

This is a generic workaround that is intended to handle
slightly incorrect input files. It is very possible that some
demuxers contain bugs that lead to wrong timestamps, these demuxers
should of course still be fixed even if this change happens to
hide the issue.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 02:12:22 +02:00
Michael Niedermayer
ca19862d38 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libxvid: remove disabled code
  qdm2: make a table static const
  qdm2: simplify bitstream reader setup for some subpacket types
  qdm2: use get_bits_left()
  build: Consistently handle conditional compilation for all optimization OBJS.
  avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics
  msrle: convert MS RLE decoding function to bytestream2.
  x86inc improvements for 64-bit

Conflicts:
	common.mak
	libavcodec/avpacket.c
	libavcodec/bfi.c
	libavcodec/msrledec.c
	libavcodec/qdm2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-13 00:39:19 +02:00
Stefano Sabatini
5eeecde859 lavfi/mp: remove 2xsai wrapped filter
It was ported to a native libavfilter filter.
2012-04-13 00:14:06 +02:00
Stefano Sabatini
b7a7830dd4 lavfi: port 2xsai filter from libmpcodecs
Partially based on the port by Niel van der Westhuizen
<nielkie@gmail.com>, done for GCI 2010. Same output as the original
filter and as fast.

See thread:
Subject: [FFmpeg-devel] [PATCH] Port MPlayer 2xSaI filter to libavfilter
Date: Thu, 25 Nov 2010 01:31:24 +1000
2012-04-13 00:14:06 +02:00
Stefano Sabatini
e21dac3a4f examples/decoding_encoding: remove unused variable "size"
Remove unused variable size from video_encode_example() function.

Fix GCC warning:
decoding_encoding.c:214:22: warning: unused variable ‘size’ [-Wunused-variable]
2012-04-13 00:13:31 +02:00
Stefano Sabatini
162e400464 lavfi: install asrc_abuffer.h header
The header is part of the public API, in particular is used by
doc/examples/filtering_audio.c.
2012-04-13 00:13:30 +02:00
Diego Biurrun
6048fd22ee git-howto: Explain how to avoid Windows line endings in git checkouts. 2012-04-12 23:20:58 +02:00
Diego Biurrun
baaab6069a build: Move all arch OBJS declarations into arch subdirectory Makefiles. 2012-04-12 21:30:13 +02:00
Reimar Döffinger
4561feb4bf vorbisdec: use correct channels variable.
All code should use the local variable, the
AVCodecContext might not yet have the updated value.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:32:08 +02:00
Reimar Döffinger
d1a58afb95 latmenc: validate extradata size.
Fixes potential out-of-bounds writes.
This is mostly possible when muxing ALS files where from
an extradata size of about 1050 put_bits would write data
outside the buffer.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:29:56 +02:00
Reimar Döffinger
9540476ba1 latmenc: simplify using avpriv_copy_bits.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:29:28 +02:00
Reimar Döffinger
eb24def465 latmenc: Document assumptions when copying the AAC header.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:28:42 +02:00
Reimar Döffinger
0c1e9c2d6a latmenc: copy pce config from proper location.
For the FATE test sample used, this only avoids a warning
message.
However for other samples like al05_44.mp4 the converted
file can be played only after this fix.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:28:37 +02:00
Reimar Döffinger
912a838efe latmenc: fix muxing of byte-aligned DSE.
This will only work for DSEs that are first in a packet, but
that is enough to fix handling of the reference files in
fate-suite/aac (though most of them still have other issues).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:27:47 +02:00
Diego Biurrun
18e8fef7c9 libxvid: remove disabled code 2012-04-12 13:10:38 +02:00
Michael Niedermayer
8274b21c09 ffmpeg: fix ticks_per_frame for the avi stream copy case
Should not make any difference, but its more correct.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 12:57:22 +02:00