Commit Graph

40552 Commits

Author SHA1 Message Date
Luca Barbato
9bd4561d74 tiff: Check the check_size() return value and forward it
Also use the same type for add_entry and check_size.

Bug-Id: CID 700699
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovarao@gmail.com>
2015-01-12 23:15:03 +01:00
Martin Storsjö
cbf31d5f15 rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit df07c07b3d)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:14:38 +01:00
Michael Niedermayer
21683549ed h261dec: Fix context initialization sequence
ff_mpv_common_init sets s->context_initialized.

This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 3bb465245f)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:14:26 +01:00
Vittorio Giovara
cbfdbba58e cmdutils: check file access functions return values
CC: libav-stable@libav.org
Bug-Id: CID 703706
(cherry picked from commit 38129c26c5)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:14:06 +01:00
Vittorio Giovara
1411f073fd aacenc: correctly check returned value
CC: libav-stable@libav.org
(cherry picked from commit 971099ff5a)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:12:25 +01:00
Vittorio Giovara
76e9a17f33 lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org
Bug-Id: CID 703624
(cherry picked from commit 63be97ec40)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 23:12:10 +01:00
Alexandre Colucci
3d0752d82f xsub: Support DXSA subtitles
These have a DXSA tag and contain alpha in addition to
color values for palette.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 5a1addd7c1)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:23:35 +01:00
Anton Khirnov
bfe18be88a mpeg4audio: check the init_get_bits() return value
Fixes possible invalid reads.

CC:libav-stable@libav.org
(cherry picked from commit 7e4e010b80)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:21:54 +01:00
Luca Barbato
f6c82b34a3 segment: Fix the failure paths
A failure in segment_end() or segment_start() would lead to freeing
a dangling pointer and in general further calls to seg_write_packet()
or to seg_write_trailer() would have the same faulty behaviour.

CC: libav-stable@libav.org
Reported-By: luodalongde@gmail.com
(cherry picked from commit b3f0465736)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:21:39 +01:00
Vittorio Giovara
3280b86c85 swscale: check memory allocations
CC: libav-stable@libav.org
Bug-Id: CID 1257779
(cherry picked from commit 1dd797e3c9)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:19:55 +01:00
Vittorio Giovara
61335ab33e opt: check memory allocation
CC: libav-stable@libav.org
Bug-Id: CID 1257771
(cherry picked from commit 07a0c0f000)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:19:38 +01:00
Martin Storsjö
932caa50a5 libavformat: Check for malloc failures in avformat_new_stream
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9f810a9b37)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-12 22:19:11 +01:00
Anton Khirnov
883795fb0f h264: restore a block mistakenly removed in e10fd08a
CC: libav-stable@libav.org
Bug-ID: 781
(cherry picked from commit 60d4c6ff76)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-27 11:07:45 +01:00
Michael Niedermayer
4895211635 on2avc: check number of channels
Fixes invalid memory access.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8549
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit cee4490b52)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
Michael Niedermayer
58dc526ebf smc: fix the bounds check
Fixes invalid writes when there are more blocks in a run than total
remaining blocks.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8548
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit d423dd72be)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 10:51:41 +01:00
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 0b39ac6f54505a538c21fe49a626de94c518c903)
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 b5d4f49e3cb1a13642542f08c8c54791c3d54dfb
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