Commit Graph

68024 Commits

Author SHA1 Message Date
Kieran Kunhya 36091742d1 v210enc: Add SIMD optimised 8-bit and 10-bit encoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 20:30:47 +01:00
Michael Niedermayer 1d3a3b9f89 avcodec/rawdec: Check the return code of avpicture_get_size()
Fixes out of array access
Fixes: asan_heap-oob_22388d0_3435_cov_3297128910_small_roll5_FlashCine1.cine
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 19:01:17 +01:00
Michael Niedermayer 1b5d112406 avformat/mov: Fix memleaks for duplicate STCO/CO64/STSC atoms
Also see [FFmpeg-devel] [PATCH] avformat/mov: strengthen some table allocations
which contains more fixes but is unfinished

Fixes: signal_sigabrt_7ffff6ac7bb9_3484_cov_1830000177_starfox2.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 18:36:17 +01:00
Michael Niedermayer 9a53707e86 avcodec/pngdec: Fix paeth prediction with small images
Fixes out of array read
Fixes: asan_heap-oob_20b0a06_1962_cov_1907976991_delete_node_small.png
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 17:01:26 +01:00
Michael Niedermayer 79ceaf827b avcodec/pngdec: Check IHDR/IDAT order
Fixes out of array access
Fixes: asan_heap-oob_20a6c26_2690_cov_3434532168_mail.png
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 16:00:01 +01:00
Benoit Fouet 8b8cb30d11 avformat/apngdec: use packet pts and duration instead of altering stream framerate.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 12:41:56 +01:00
Michael Niedermayer 0df95fa327 Merge commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa'
* commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa':
  movenc: Expose the fragment index as an avoption

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 12:27:01 +01:00
Michael Niedermayer b78074fd13 Merge commit 'ee37620b6ae4783cda637408422044b2d14a688c'
* commit 'ee37620b6ae4783cda637408422044b2d14a688c':
  movenc: Add a flag for indicating a discontinuous fragment

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 11:27:17 +01:00
Martin Storsjö 234fb81e31 movenc: Expose the fragment index as an avoption
This allows setting the right fragment number if doing
random-access writing of fragments, and also allows reading the
current sequence number.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-26 09:58:13 +02:00
Martin Storsjö ee37620b6a movenc: Add a flag for indicating a discontinuous fragment
This allows creating a later mp4 fragment without sequentially
writing the earlier ones before (when called from a segmenter).

Normally when writing a fragmented mp4 file sequentially, the
first timestamps of a fragment are adjusted to match the
end of the previous fragment, to make sure the timestamp is the
same, even if it is calculated as the sum of previous fragment
durations. (And for the first packet in a file, the offset of
the first packet is written using an edit list.)

When writing an individual mp4 fragment discontinuously like this
(with potentially writing the earlier fragments separately later),
there's a risk of getting a gap in the timeline if the duration
field of the last packet in the previous fragment doesn't match up
with the start time of the next fragment.

Using this requires setting -avoid_negative_ts make_non_negative
(or -avoid_negative_ts 0).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-26 09:56:56 +02:00
Michael Niedermayer 5f30522894 avcodec/flacdec: fix off by 1 error
Fixes assertion failure
Fixes: signal_sigsegv_324b284_1980_dilvie___the_dragonfly.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 04:11:16 +01:00
Michael Niedermayer e5c01ccdf5 avcodec/flacdec: Call ff_flacdsp_init() unconditionally
Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 04:11:08 +01:00
Michael Niedermayer 2ad38c6e02 avformat/mxfdec: dont ask for samples with field dominance 0 anymore
Based on discussion and patch from
"[FFmpeg-devel] [PATCH]Do not ask for mxf samples with unknown field dominance"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 02:07:57 +01:00
Benoit Fouet 4acefd2521 avformat/apngdec: account for blend and dispose operations.
When the dimensions are the entire frame ones, and the dispose operation
is to reset to background, or the new frame overwrites the new one, then
consider the frame as a key one.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 00:59:45 +01:00
Carl Eugen Hoyos 5badcdf20d Rename sync() functions in libavformat.
Fixes compilation on Android where the sync() definition in
unistd.h interferes with the static definitions in libavformat.
2014-11-25 23:49:58 +01:00
Lukasz Marek 1907ff0a67 lavc/utils: free private options on avcodec_open2 fail
It protects leaking string/binary/dict options from priv context.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-25 23:09:16 +01:00
Lukasz Marek ea0d893817 lavu/opt: handle NULL obj in av_opt_next
It indirectly also fixes av_opt_free for NULL objs.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-25 23:09:16 +01:00
Lukasz Marek 2a89afb376 lavc/libxvid: return meaningful error codes
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-25 22:18:08 +01:00
Lukasz Marek e29153f414 lavc/avuienc: fix mem leak in case of init failure
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-25 22:18:08 +01:00
Michael Niedermayer 23e91a1bfd Merge commit 'f20141d73f08ed0c8e875bd993a7143e19b266e3'
* commit 'f20141d73f08ed0c8e875bd993a7143e19b266e3':
  vorbis_parser: Include stdint.h in the header, to make it work standalone

See: e2e36a739d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 21:38:13 +01:00
Benoit Fouet 155f4dd668 doc: add entry for APNG demuxer where needed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 18:28:32 +01:00
Yu Xiaolei bc3d02fa88 lavf/avio: clarify the buffer parameter of avio_alloc_context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 18:19:00 +01:00
Michael Niedermayer 2f1de5ca13 avcodec/huffyuvdec: apply vertical filter in steps of 1 line for interlaced BGRA
Fixes out of array read
Fixes: signal_sigsegv_3287332_2301_cov_2994954934_huffyuv.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 17:53:27 +01:00
Michael Niedermayer d0879a93ea avformat/os_support: try to fix build when included from a c++ file like libavdevice/decklink*cpp
Found-by: Zeranoe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 17:07:02 +01:00
Michael Niedermayer 8cd80b5fcb avformat/jacosubdec: Cleanup when avpriv_bprint_to_extradata() fails
Fixes memleaks
Fixes: asan_heap-oob_4d2250_814_cov_2745172097_JACOsub_capability_tester.jss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 15:20:54 +01:00
Michael Niedermayer 3d5d95db3f avcodec/utils: Check that the data is complete in avpriv_bprint_to_extradata()
Fixes out of array read
Fixes: asan_heap-oob_4d2250_814_cov_2745172097_JACOsub_capability_tester.jss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 14:48:04 +01:00
Michael Niedermayer 0eecf40935 avcodec/mjpegdec: Fix context fields becoming inconsistent
Fixes out of array access
Fixes: asan_heap-oob_1ca4f85_2760_cov_144449187_miss_congeniality_pegasus_ljpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 13:54:20 +01:00
Martin Storsjö f20141d73f vorbis_parser: Include stdint.h in the header, to make it work standalone
This fixes "make checkheaders".

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-25 14:01:46 +02:00
Michael Niedermayer ca59b5b6ec avfilter/x86/vf_interlace: remove redundant instructions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:37:19 +01:00
Michael Niedermayer 3fe3c8abb1 Merge commit 'ca5c3ff90972a5c97aabda2ace57ba72dcd7d83b'
* commit 'ca5c3ff90972a5c97aabda2ace57ba72dcd7d83b':
  vf_interlace: x86: improve asm performance

Conflicts:
	libavfilter/x86/vf_interlace.asm

See: 05e4b25e9b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:31:45 +01:00
Michael Niedermayer 8c9945285e Merge commit '57ed5a64feec4af1f16f9a74c63cfa9aa8147242'
* commit '57ed5a64feec4af1f16f9a74c63cfa9aa8147242':
  hnm4: change width/height to int to fix hypothetical integer overflows

See: e23b18321f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:27:42 +01:00
Michael Niedermayer ba1a19bc35 Merge commit '16158da9607f2f84232d3dd381406b2f2449ec74'
* commit '16158da9607f2f84232d3dd381406b2f2449ec74':
  hnm4: Use av_image_check_size

See: e23b18321f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:19:08 +01:00
Michael Niedermayer 0e85a28fa4 Merge commit '51946d2de8bd4a4aada43b6ab41340b0f5eb4ecb'
* commit '51946d2de8bd4a4aada43b6ab41340b0f5eb4ecb':
  vc1: Use the correct shift amount

See: a52f443714
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:15:01 +01:00
Michael Niedermayer 79f77ce31c Merge commit 'd25afb579facc83fd3a839f21411124d0b09f0ba'
* commit 'd25afb579facc83fd3a839f21411124d0b09f0ba':
  vc1: Set the is_intra bitfield to all 1 when needed

Conflicts:
	libavcodec/vc1_block.c

See: 04152a31cb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:00:11 +01:00
Michael Niedermayer ed25ca1661 Merge commit 'b67138598ce158e3083f6295a27b63e2065d5ecb'
* commit 'b67138598ce158e3083f6295a27b63e2065d5ecb':
  vc1: Simplify a little setting the intra variables

Conflicts:
	libavcodec/vc1_block.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 11:33:51 +01:00
Michael Niedermayer bcccb2c298 Merge commit '62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f'
* commit '62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f':
  vorbis_parser: Move vp check to avoid a null pointer dereference

See: 374c907fb3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 11:20:27 +01:00
Michael Niedermayer a63ec9d573 Merge commit 'c117da9d3e0db7dc311d817054988364b3ef4587'
* commit 'c117da9d3e0db7dc311d817054988364b3ef4587':
  lpc: remove unneeded {}

See: 85929b9caa
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 11:18:58 +01:00
Michael Niedermayer 0aa208837e Merge commit 'bc75b64cff37d58f3944e2da3da45c37f35f019a'
* commit 'bc75b64cff37d58f3944e2da3da45c37f35f019a':
  vc1pred: remove logically dead code

Conflicts:
	libavcodec/vc1_pred.c

See: fca435fee1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 11:05:15 +01:00
Carl Eugen Hoyos 1f3d478898 avdevice/decklink_common: Fix "Cross-compiling FFmpeg on Debian for Windows with MinGW-w64"
Fixes Ticket4130

Requested and Tested by: Zeranoe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 04:40:49 +01:00
Michael Niedermayer 67dbf8bec9 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Include config.h from huffyuvdsp.h.
  Include stddef from snow_dwt.h.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 04:12:26 +01:00
Michael Niedermayer c724c82a78 doc/print_options: Fix build on mingw after 960aff379d
A cleaner fix is very welcome

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 04:04:00 +01:00
Michael Niedermayer 60420fa3dc avdevice/dshow: fix build, ensure that feature enable #defines are set before includes
dshow_capture.h sets up various flags before including windows headers
this must occur before other headers (like os_support.h) include these
headers without the setup

This could be fixed differently but for now this fixes building on mingw

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 04:02:48 +01:00
Michael Niedermayer ca5c3ff909 vf_interlace: x86: improve asm performance
4775 decicycles -> 3688 decicycles
2014-11-25 02:00:06 +00:00
Michael Niedermayer 57ed5a64fe hnm4: change width/height to int to fix hypothetical integer overflows
CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771
2014-11-25 02:00:06 +00:00
Luca Barbato 16158da960 hnm4: Use av_image_check_size
As done for all the other codecs not calling it indirectly.

CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771
2014-11-25 02:00:06 +00:00
Michael Niedermayer 51946d2de8 vc1: Use the correct shift amount
`is_intra` is a 6bits bitfield.

CC: libav-stable@libav.org
Bug-Id: CID 1194380 / CID 1194381

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-11-25 02:00:06 +00:00
Luca Barbato d25afb579f vc1: Set the is_intra bitfield to all 1 when needed
Keep the code as similar as possible across the codepaths to
ease spotting it for factorization.

Based on a patch from Michael Niedermayer <michaelni@gmx.at>.
2014-11-25 02:00:06 +00:00
Luca Barbato b67138598c vc1: Simplify a little setting the intra variables
The code currently set the information in at least 4 places, spare
some pointless loops.

Make the code in the loop a little uniform to make easier factorize
it out later.
2014-11-25 02:00:06 +00:00
Michael Niedermayer 62e52b94e6 vorbis_parser: Move vp check to avoid a null pointer dereference
CC: libav-stable@libav.org
Bug-Id: CID 1251347
2014-11-25 02:00:06 +00:00
Michael Niedermayer c117da9d3e lpc: remove unneeded {}
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 02:00:06 +00:00