Commit Graph

40537 Commits

Author SHA1 Message Date
Michael Niedermayer
eac49477aa gifdec: refactor interleave end handling
Fixes invalid writes with very small image heights.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8547
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 0b39ac6f54)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
Anton Khirnov
69a930b988 mmvideo: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 2.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8543
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 17ba719d9b)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
Anton Khirnov
55788572ea jvdec: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 8.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8542
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 88626e5af8)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:40 +01:00
Anton Khirnov
aa7a19b417 mjpegdec: check for pixel format changes
Fixes possible invalid memory access.

Based on code by Michael Niedermayer <michaelni@gmx.at>

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8541
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 809c3023b6)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:40 +01:00
Anton Khirnov
577f1feb3f mov: avoid a memleak when multiple stss boxes are present
CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 64f7575fbd)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:40 +01:00
Luca Barbato
3ea49fc508 vc1: Do not assume seek happens after decoding
If a seek is requested before the decoding start there is no
current picture.

CC: libav-stable@libav.org
(cherry picked from commit 3e348ecfc6ab1830e43288a9e12e8f0a000afbcb)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-12-19 17:58:22 +01:00
Julien Ramseier
864c0c50eb avconv: Use the mpeg12 private option scan_offset
Introduced in aed7900704

Bug-Id: debian/773055
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit fd665f7f48)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:43:25 +01:00
Reinhard Tartler
1cc6fef067 Prepare for 11.1 Release 2014-12-01 21:39:37 -05:00
Reinhard Tartler
60ccc1a748 Update changelog for v11.1 2014-12-01 21:39:01 -05:00
Reinhard Tartler
b31a3c6f26 Replace lena.pnm
The new reference.pnm is a freely licensed replacement. The photo has
been taken by Reinhard Tartler on August 28 2014, and is licensed under
the expat license as stated at http://www.jclark.com/xml/copying.txt

(cherry picked from commit 8895bf7b78)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-12-01 08:02:45 -05:00
Reinhard Tartler
ce99ef48ea Treat all '*.pnm' files as non-text file
This convinces the pre-receive hook to not consider all *.pnm files as
text files to reduce the patch sizes and avoids triggering whitespace
checks,

Contains a correction by Janne Grunau <janne-libav@jannau.net>

(cherry picked from commit 0f257e29c5)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-12-01 08:02:37 -05:00
Anton Khirnov
ca78ee73db opusdec: make sure all substreams have the same number of coded samples
Fixes invalid writes with invalid multichannel streams.

CC:libav-stable@libav.org
(cherry picked from commit 1973079417)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-27 14:11:51 +01:00
wm4
517ce1d09b lavu: fix memory leaks by using a mutex instead of atomics
The buffer pool has to atomically add and remove entries from the linked
list of available buffers. This was done by removing the entire list
with a CAS operation, working on it, and then setting it back again
(using a retry-loop in case another thread was doing the same thing).

This could effectively cause memory leaks: while a thread was working on
the buffer list, other threads would allocate new buffers, increasing
the pool's total size. There was no real leak, but since these extra
buffers were not needed, but not free'd either (except when the buffer
pool was destroyed), this had the same effects as a real leak. For some
reason, growth was exponential, and could easily kill the process due
to OOM in real-world uses.

Fix this by using a mutex to protect the list operations. The fancy
way atomics remove the whole list to work on it is not needed anymore,
which also avoids the situation which was causing the leak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit fbd6c97f9c)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-27 13:38:29 +01:00
Anton Khirnov
46a17d886b lavu: add wrappers for the pthreads mutex API
Also add no-op fallbacks when threading is disabled.

This helps keeping the code clean if Libav is compiled for targets
without threading. Since we assume that no threads of any kind are used
in such configurations, doing nothing is ok by definition.

Based on a patch by wm4 <nfxjfg@googlemail.com>.

(cherry picked from commit 2443e522f0)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-27 13:38:27 +01:00
Anton Khirnov
12700b0219 mp3enc: fix a triggerable assert
We have to check against the number of bytes actually needed, not the
theoretical maximum size.
2014-11-14 20:22:40 +01:00
Timothy B. Terriberry
ca8c62d187 resample: Avoid off-by-1 errors in PTS calcs.
The rounding used in the PTS calculations in filter_frame() does
not actually match the number of samples output by the resampler.
This leads to off-by-1 errors in the timestamps indicating gaps and
underruns, even when the input timestamps are all contiguous.

Bug-Id: 753

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 6cbbf0592f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-18 05:11:23 +02:00
Vittorio Giovara
e443165c32 imc: fix order of operations in coefficients read
Reported-by: Ruoyu <liangry@ucweb.com>
2014-10-15 14:51:19 +01:00
Anton Khirnov
0b41eeac45 hevc_mvs: make sure to always initialize the temporal MV fully
The spec requires this.

Fixes uninitialized reads on some samples.

Remove now unnecessary initialization of the whole merge candidate list.
2014-10-08 12:31:08 +01:00
Anton Khirnov
de31f85707 hevc_mvs: initialize the temporal MV in case of missing ref
The caller expects the MV to always be initialized.
2014-10-08 12:30:54 +01:00
Michael Niedermayer
ff24824a72 h264: reset ret to avoid propagating minor failures
Unbreak 772d150a6e.

CC: libav-stable@libav.org
Bug-Id: 750 / 905753
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-09-29 12:35:32 +01:00
Luca Barbato
570cefb02b hevc: Initialize mergecand_list to 0
Unbreak cf6090dc62.

CC: libav-stable@libav.org
Sample-Id: hevc-conformance-LTRPSPS_A_Qualcomm_1
2014-09-29 12:35:16 +01:00
Rémi Denis-Courmont
ce0972ecdd mpeg12: Always invoke the get_format() callback
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-26 22:05:37 +02:00
Rémi Denis-Courmont
09c848855a h264: Always invoke the get_format() callback
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-26 22:05:34 +02:00
Diego Biurrun
9eb442cca2 Update default FATE URL for release/11 2014-09-17 07:08:57 -07:00
Katerina Barone-Adesi
b45ab61b24 apetag: Fix APE tag size check
The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

(cherry picked from commit c5560e72d0)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-17 07:07:22 -07:00
Diego Biurrun
f851477889 Prepare for 11 release 2014-09-13 11:14:46 -07:00
Diego Biurrun
4f2d4b98fc doc: Fix syntax and logical errors in avconv stream combination example
Bug-Id: 661
CC: libav-stable@libav.org
(cherry picked from commit 775a0b04f0)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-10 12:01:16 -07:00
Sean McGovern
7d8ebb8774 Fix RELEASE identification
This was accidentally left over in b5d4f49e3c
2014-09-08 20:58:45 -04:00
Diego Biurrun
07b0ccf511 Mark 11 release in the changelog
Also fix some typos in the entries for the 11 release.

(cherry picked from commit d9792b7735)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-04 15:20:11 -07:00
Anton Khirnov
9d3e69ae30 Add release notes for 11.
(cherry picked from commit 12f0388f9c)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-04 08:25:45 -07:00
Michael Niedermayer
480633c6c2 avcodec: fix missing doxygen comment marker 2014-09-01 00:48:58 +01:00
Reinhard Tartler
b5d4f49e3c Prepare for 11_beta2 Release 2014-08-30 11:51:28 -04:00
Diego Biurrun
4cde8bae49 license: Mention that vf_interlace is GPL, not LGPL
(cherry picked from commit 9e8bbe7d4d)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-28 10:50:34 -07:00
Vittorio Giovara
5b740d1eaa matroskaenc: convert avstream stereo3d side data during encoding
Write the StereoMode Embl to bitstream.
2014-08-28 13:07:17 -04:00
Vittorio Giovara
152e09fde7 matroskadec: parse stereo mode on decoding
Convert the Matroska stereo format to the Stereo3D format, and add a
Stereo3D side data to the stream.

Bump the doctype version supported.

Bug-Id: 728 / https://bugs.debian.org/757185
2014-08-28 13:07:17 -04:00
Vittorio Giovara
110841c3ab avcodec: add stream-level stereo3d side data 2014-08-28 13:05:31 -04:00
Vittorio Giovara
5694831e06 matroska: list supported extensions 2014-08-28 13:05:31 -04:00
Anton Khirnov
1f52f82a55 doc/APIchanges: fill in missing hashes and dates 2014-08-28 13:02:15 -04:00
Luca Barbato
e62f08ca8d pulse: Add a wallclock option to be compatible with other other captures
alsa and x11grab use av_gettime() to report timestamps.

Have it on by default.

Bug-Id: 647
(cherry picked from commit 424b929b5c)
(cherry picked from commit 404731bd20)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-28 11:13:19 +02:00
Luca Barbato
ee099059e7 vc1: Initialize start_code_found to 0 2014-08-27 12:38:09 +02:00
Anton Khirnov
e2a89f7f0f avconv: fix parsing the AVOptions for -target
CC: libav-stable@libav.org
(cherry picked from commit f5245a9c62)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-27 06:25:26 +00:00
Anton Khirnov
7c46855074 avconv: fix the muxrate values for -target
The mpegenc private option values are in 50-byte units.

CC: libav-stable@libav.org
(cherry picked from commit 1688eef253)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-27 06:25:25 +00:00
Anton Khirnov
c2d6cc2971 mpegenc: limit the maximum muxrate
It is written to the file as a 22-bit value.

CC: libav-stable@libav.org
(cherry picked from commit 75bbaf2493)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-27 06:25:24 +00:00
Luca Barbato
8c91414803 vc1: Fix the skip condition
As written in the comment above, skip must be added only if a
start code is found.
2014-08-26 14:47:45 +02:00
Diego Biurrun
0263750a0d vfwcap: Add fallback define for HWND_MESSAGE
Some obsolete versions of the MinGW32 runtime (<4.0.0) lack the definition.

(cherry picked from commit ab56fabe62)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-25 17:17:29 -07:00
Diego Biurrun
63795fe5b9 setpts: Add missing inttypes.h #include for PRId64
Also convert a debug av_log() to av_dlog().

(cherry picked from commit 593aaee953)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
Diego Biurrun
d2bad216f7 mpeg12enc: Add missing #include for PICT_FRAME
(cherry picked from commit 8fc6a70c21)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
Diego Biurrun
d04fb11868 error_resilience: Drop asserts from guess_mv()
The asserts check struct members that are not referenced in guess_mv()
and one of them fails to compile.

(cherry picked from commit 7cb66ebc0b)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
Diego Biurrun
e8f2823f06 vsrc_movie: Adjust a silly typo from b977b287f6
(cherry picked from commit 11cd727fbd)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
Anton Khirnov
7dfccac20c electronicarts: do not fail on zero-sized chunks
At least one FATE sample contains such chunks and happens to work simply
by accident (due to find_stream_info() swallowing the error).

CC: libav-stable@libav.org
(cherry picked from commit 4d6c515284)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-22 11:25:40 +00:00