platform/upstream/libav.git
9 years agolavf: replace rename() with ff_rename()
Luca Barbato [Sun, 19 Oct 2014 22:48:49 +0000 (00:48 +0200)]
lavf: replace rename() with ff_rename()

The new function wraps errno so that its value is correctly reported
when other functions overwrite it (eg. in case of logging).

CC: libav-stable@libav.org
Bug-Id: CID 1135748
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoimg2dec: check av_new_packet return value
Vittorio Giovara [Mon, 20 Oct 2014 13:11:15 +0000 (14:11 +0100)]
img2dec: check av_new_packet return value

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

9 years agoaudiointerleave: check av_new_packet return value
Vittorio Giovara [Mon, 20 Oct 2014 13:11:14 +0000 (14:11 +0100)]
audiointerleave: check av_new_packet return value

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

9 years agoavfilter: check filter link validity
Vittorio Giovara [Mon, 20 Oct 2014 13:11:13 +0000 (14:11 +0100)]
avfilter: check filter link validity

Remove now redundant check.

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

9 years agomp3dec: fix reading the Xing tag
Anton Khirnov [Sat, 18 Oct 2014 14:25:16 +0000 (16:25 +0200)]
mp3dec: fix reading the Xing tag

The quality scale field is only supposed to be present if the fourth bit
is set. In practice, lame always sets it, but other tools might not.

CC:libav-stable@libav.org

9 years agonutdec: check av_new_packet return value
Vittorio Giovara [Mon, 20 Oct 2014 13:11:19 +0000 (14:11 +0100)]
nutdec: check av_new_packet return value

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

9 years agormdec: check av_new_packet return value
Vittorio Giovara [Mon, 20 Oct 2014 13:11:17 +0000 (14:11 +0100)]
rmdec: check av_new_packet return value

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

9 years agovf_format: check input validity
Vittorio Giovara [Sat, 18 Oct 2014 15:10:35 +0000 (16:10 +0100)]
vf_format: check input validity

CC: libav-stable@libav.org
9 years agoaviobuf: check context before using it
Vittorio Giovara [Sat, 18 Oct 2014 00:12:13 +0000 (01:12 +0100)]
aviobuf: check context before using it

Avoid a possible null pointer dereference.

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

9 years agoavio: fix sizeof argument
Michael Niedermayer [Sat, 18 Oct 2014 00:12:12 +0000 (01:12 +0100)]
avio: fix sizeof argument

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

9 years agoswscale: fix sign extensions in yuv planar conversion
Vittorio Giovara [Fri, 17 Oct 2014 13:31:35 +0000 (14:31 +0100)]
swscale: fix sign extensions in yuv planar conversion

Casting the left-most byte to unsigned avoids an undefined
result of the shift by 24 if bit 7 is set.

yuvPlanartouyvy_c and yuvPlanartoyuy2_c are affected.

CC: libav-stable@libav.org
Bug-Id: CID 732281 / CID 732282

9 years agooss_audio: use a macro to simplify ioctl() error checking
Timothy Gu [Wed, 15 Oct 2014 16:32:54 +0000 (17:32 +0100)]
oss_audio: use a macro to simplify ioctl() error checking

Also add a note about SNDCTL_DSP_GETFMTS which may fail even if OSS is
available.

CC: libav-stable@libav.org
Bug-Id: CID 1238992
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoavresample: Make sure the even check does not overflow
Luca Barbato [Wed, 15 Oct 2014 16:32:57 +0000 (17:32 +0100)]
avresample: Make sure the even check does not overflow

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

9 years agoaf_resample: check av_opt_set_dict return value
Vittorio Giovara [Fri, 17 Oct 2014 09:07:11 +0000 (10:07 +0100)]
af_resample: check av_opt_set_dict return value

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

9 years agovf_showinfo: Forward the av_image_get_linesize error
Vittorio Giovara [Fri, 17 Oct 2014 09:07:09 +0000 (10:07 +0100)]
vf_showinfo: Forward the av_image_get_linesize error

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

9 years agovf_drawtext: Do not leak the mmapped textfile
Luca Barbato [Fri, 17 Oct 2014 09:07:10 +0000 (10:07 +0100)]
vf_drawtext: Do not leak the mmapped textfile

And validate its size while at it.

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

9 years agocmdutils: Use the correct guard
Luca Barbato [Wed, 15 Oct 2014 00:43:30 +0000 (02:43 +0200)]
cmdutils: Use the correct guard

The OptionDef arrays are terminated with a { NULL } element not NULL.

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

9 years agoavformat: Make avformat_free_context handle NULL
Luca Barbato [Wed, 15 Oct 2014 00:35:55 +0000 (02:35 +0200)]
avformat: Make avformat_free_context handle NULL

Work as the other free()-like functions.

Bug-Id: CID 1087081
CC: libav-stable@libav.org
9 years agortsp: Check a memory allocation
Michael Lynch [Tue, 14 Oct 2014 20:30:39 +0000 (16:30 -0400)]
rtsp: Check a memory allocation

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agorm: Use the correct codec_data_size signedness
Luca Barbato [Thu, 4 Dec 2014 11:00:01 +0000 (12:00 +0100)]
rm: Use the correct codec_data_size signedness

The function takes a size and not an offset.

CC: libav-stable@libav.org
Sample-Id: rm_deadlock.rm

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agolatm: Do not give a score for a single instance
Luca Barbato [Fri, 5 Dec 2014 14:31:20 +0000 (15:31 +0100)]
latm: Do not give a score for a single instance

Bug-Id: 773
CC: libav-stable@libav.org
9 years agomp3: Tweak the probe scores
Luca Barbato [Sat, 6 Dec 2014 11:32:25 +0000 (12:32 +0100)]
mp3: Tweak the probe scores

Having more than 10 consecutive frames decoded as mp3 should be
considered a clear signal that the sample is mp3 and not mpegps.

Reported-By: Florian Iragne <florian@iragne.fr>
CC: libav-stable@libav.org
9 years agovf_frei0r: do not increment string if it reached the end
Vittorio Giovara [Fri, 5 Dec 2014 02:15:09 +0000 (02:15 +0000)]
vf_frei0r: do not increment string if it reached the end

Bug-Id: 778
CC: libav-stable@libav.org
9 years agosvq1dec: Unbreak the scratch buffer allocation
Michael Niedermayer [Sat, 6 Dec 2014 10:40:30 +0000 (11:40 +0100)]
svq1dec: Unbreak the scratch buffer allocation

The input packets are always assumed to be padded and
the av_fast_ family of function takes a pointer to a pointer.

Thanks to Nicolas Dufresne <nicolas.dufresne@collabora.com> for
a similar patch.

Introduced in 7b588bb691644e1b3c168b99accf74248a24e3cf.

Bug-Id: 766
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agovaapi: wrap codec specific functions in appropiate #ifs
Thiago Santos [Sun, 14 Dec 2014 20:59:27 +0000 (22:59 +0200)]
vaapi: wrap codec specific functions in appropiate #ifs

Fix linking when only a subset of vaapi decoders is enabled.

Bug-Id: 760
CC: libav-stable@libav.org
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agohevc: always clip luma_log2_weight_denom
Vittorio Giovara [Wed, 10 Dec 2014 01:41:44 +0000 (01:41 +0000)]
hevc: always clip luma_log2_weight_denom

Its value shall be between 0 and 7 according to the specifications.

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

9 years agoprores: Evaluate all the quantizers
Luca Barbato [Wed, 10 Dec 2014 00:43:50 +0000 (01:43 +0100)]
prores: Evaluate all the quantizers

Prevent an uninitialized data access.

CC: libav-stable@libav.org
Bug-Id: CID 703824 / CID 703825
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agotiff: Check the check_size() return value and forward it
Luca Barbato [Wed, 10 Dec 2014 01:44:20 +0000 (02:44 +0100)]
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>
9 years agortpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
Martin Storsjö [Wed, 17 Dec 2014 11:50:06 +0000 (13:50 +0200)]
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 df07c07b3de0a5e8890078944de1eb5cb8372ef8)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoh261dec: Fix context initialization sequence
Michael Niedermayer [Fri, 15 Aug 2014 00:50:41 +0000 (02:50 +0200)]
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 3bb465245fed6069512e6821000391beae8a6066)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agocmdutils: check file access functions return values
Vittorio Giovara [Tue, 16 Dec 2014 09:43:48 +0000 (10:43 +0100)]
cmdutils: check file access functions return values

CC: libav-stable@libav.org
Bug-Id: CID 703706
(cherry picked from commit 38129c26c51b933d7db423f904ba0cd6a88ca1ed)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoaacenc: correctly check returned value
Vittorio Giovara [Wed, 17 Dec 2014 13:53:43 +0000 (14:53 +0100)]
aacenc: correctly check returned value

CC: libav-stable@libav.org
(cherry picked from commit 971099ff5a85377579eb5b8d3620e283957f097e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agolavfi: always check av_expr_parse_and_eval() return value
Vittorio Giovara [Wed, 17 Dec 2014 14:19:43 +0000 (15:19 +0100)]
lavfi: always check av_expr_parse_and_eval() return value

CC: libav-stable@libav.org
Bug-Id: CID 703624
(cherry picked from commit 63be97ec403023fb664798432acedaf6e6922527)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoxsub: Support DXSA subtitles
Alexandre Colucci [Wed, 7 Jan 2015 11:18:08 +0000 (12:18 +0100)]
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 5a1addd7c1d8ff218ed4b84f4f02fdb83980094c)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agompeg4audio: check the init_get_bits() return value
Anton Khirnov [Thu, 1 Jan 2015 16:56:56 +0000 (17:56 +0100)]
mpeg4audio: check the init_get_bits() return value

Fixes possible invalid reads.

CC:libav-stable@libav.org
(cherry picked from commit 7e4e010b80e76862e83afbd41c25d50e72f0b44c)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agosegment: Fix the failure paths
Luca Barbato [Mon, 5 Jan 2015 09:40:41 +0000 (10:40 +0100)]
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 b3f04657368a32a9903406395f865e230b1de348)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoswscale: check memory allocations
Vittorio Giovara [Wed, 17 Dec 2014 15:02:07 +0000 (16:02 +0100)]
swscale: check memory allocations

CC: libav-stable@libav.org
Bug-Id: CID 1257779
(cherry picked from commit 1dd797e3c9f179f957316a0becbec048b42df8aa)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoopt: check memory allocation
Vittorio Giovara [Thu, 18 Dec 2014 19:26:57 +0000 (20:26 +0100)]
opt: check memory allocation

CC: libav-stable@libav.org
Bug-Id: CID 1257771
(cherry picked from commit 07a0c0f0005072d115ace61e60f46be68582cc3a)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agolibavformat: Check for malloc failures in avformat_new_stream
Martin Storsjö [Sat, 3 Jan 2015 19:27:21 +0000 (21:27 +0200)]
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 9f810a9b374e0ff8e2a19fd8a7347afe2933e229)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoh264: restore a block mistakenly removed in e10fd08a
Anton Khirnov [Thu, 25 Dec 2014 21:46:39 +0000 (22:46 +0100)]
h264: restore a block mistakenly removed in e10fd08a

CC: libav-stable@libav.org
Bug-ID: 781
(cherry picked from commit 60d4c6ff76467d4d8f55c1cc61ab6c618e8ea2f3)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoon2avc: check number of channels
Michael Niedermayer [Sat, 4 Oct 2014 20:15:07 +0000 (22:15 +0200)]
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 cee4490b521fd0d02476d46aa2598af24fb8d686)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agosmc: fix the bounds check
Michael Niedermayer [Fri, 3 Oct 2014 20:50:45 +0000 (22:50 +0200)]
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 d423dd72be451462c6fb1cbbe313bed0194001ab)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agogifdec: refactor interleave end handling
Michael Niedermayer [Fri, 3 Oct 2014 18:15:52 +0000 (20:15 +0200)]
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>
9 years agommvideo: check frame dimensions
Anton Khirnov [Sun, 14 Dec 2014 20:01:59 +0000 (21:01 +0100)]
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 17ba719d9ba30c970f65747f42d5fbb1e447ca28)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agojvdec: check frame dimensions
Anton Khirnov [Sun, 14 Dec 2014 20:01:59 +0000 (21:01 +0100)]
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 88626e5af8d006e67189bf10b96b982502a7e8ad)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agomjpegdec: check for pixel format changes
Anton Khirnov [Sun, 14 Dec 2014 19:52:13 +0000 (20:52 +0100)]
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 809c3023b699c54c90511913d3b6140dd2436550)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agomov: avoid a memleak when multiple stss boxes are present
Anton Khirnov [Tue, 12 Aug 2014 14:39:10 +0000 (14:39 +0000)]
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 64f7575fbd64e5b65d5c644347408588c776f1fe)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agovc1: Do not assume seek happens after decoding
Luca Barbato [Sat, 4 Oct 2014 10:40:35 +0000 (12:40 +0200)]
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>
9 years agoavconv: Use the mpeg12 private option scan_offset
Julien Ramseier [Sun, 14 Dec 2014 01:00:04 +0000 (02:00 +0100)]
avconv: Use the mpeg12 private option scan_offset

Introduced in aed790070486b1b01b48106310d9d0ca1730e459

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 fd665f7f48fa7db89eb9a93ac33919f6adc40f9d)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoPrepare for 11.1 Release
Reinhard Tartler [Tue, 2 Dec 2014 02:39:37 +0000 (21:39 -0500)]
Prepare for 11.1 Release

9 years agoUpdate changelog for v11.1
Reinhard Tartler [Tue, 2 Dec 2014 02:39:01 +0000 (21:39 -0500)]
Update changelog for v11.1

9 years agoReplace lena.pnm
Reinhard Tartler [Thu, 27 Nov 2014 17:21:03 +0000 (18:21 +0100)]
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 8895bf7b78650c0c21c88cec0484e138ec511a4b)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
9 years agoTreat all '*.pnm' files as non-text file
Reinhard Tartler [Fri, 28 Nov 2014 14:52:50 +0000 (09:52 -0500)]
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 0f257e29c5520b215e573e7e3abde8e5a4743309)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
9 years agoopusdec: make sure all substreams have the same number of coded samples
Anton Khirnov [Mon, 24 Nov 2014 10:16:46 +0000 (11:16 +0100)]
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 1973079417e8701b52ba810a72cb6c7c6f7f9a56)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agolavu: fix memory leaks by using a mutex instead of atomics
wm4 [Fri, 14 Nov 2014 12:34:50 +0000 (13:34 +0100)]
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 fbd6c97f9ca858140df16dd07200ea0d4bdc1a83)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agolavu: add wrappers for the pthreads mutex API
Anton Khirnov [Sun, 23 Nov 2014 20:25:05 +0000 (21:25 +0100)]
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 2443e522f0059176ff8717c9c753eb6fe7e7bbf1)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agomp3enc: fix a triggerable assert
Anton Khirnov [Fri, 14 Nov 2014 19:20:50 +0000 (20:20 +0100)]
mp3enc: fix a triggerable assert

We have to check against the number of bytes actually needed, not the
theoretical maximum size.

9 years agoresample: Avoid off-by-1 errors in PTS calcs.
Timothy B. Terriberry [Tue, 14 Oct 2014 00:46:00 +0000 (17:46 -0700)]
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 6cbbf0592f4f3940aac7f687850d1b726a2ea836)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoimc: fix order of operations in coefficients read
Vittorio Giovara [Mon, 13 Oct 2014 14:42:28 +0000 (15:42 +0100)]
imc: fix order of operations in coefficients read

Reported-by: Ruoyu <liangry@ucweb.com>
9 years agohevc_mvs: make sure to always initialize the temporal MV fully
Anton Khirnov [Mon, 29 Sep 2014 16:25:14 +0000 (16:25 +0000)]
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.

9 years agohevc_mvs: initialize the temporal MV in case of missing ref
Anton Khirnov [Mon, 29 Sep 2014 16:16:50 +0000 (16:16 +0000)]
hevc_mvs: initialize the temporal MV in case of missing ref

The caller expects the MV to always be initialized.

9 years agoh264: reset ret to avoid propagating minor failures
Michael Niedermayer [Sat, 27 Sep 2014 23:46:50 +0000 (00:46 +0100)]
h264: reset ret to avoid propagating minor failures

Unbreak 772d150a6e82542c06b0c251e73dd299d98d1027.

CC: libav-stable@libav.org
Bug-Id: 750 / 905753
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agohevc: Initialize mergecand_list to 0
Luca Barbato [Wed, 17 Sep 2014 17:51:40 +0000 (19:51 +0200)]
hevc: Initialize mergecand_list to 0

Unbreak cf6090dc6252f2b276aa4133e3d73a89f4c6046c.

CC: libav-stable@libav.org
Sample-Id: hevc-conformance-LTRPSPS_A_Qualcomm_1

9 years agompeg12: Always invoke the get_format() callback
Rémi Denis-Courmont [Thu, 25 Sep 2014 08:59:58 +0000 (11:59 +0300)]
mpeg12: Always invoke the get_format() callback

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoh264: Always invoke the get_format() callback
Rémi Denis-Courmont [Thu, 25 Sep 2014 08:59:57 +0000 (11:59 +0300)]
h264: Always invoke the get_format() callback

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoUpdate default FATE URL for release/11
Diego Biurrun [Wed, 17 Sep 2014 14:08:57 +0000 (07:08 -0700)]
Update default FATE URL for release/11

9 years agoapetag: Fix APE tag size check
Katerina Barone-Adesi [Mon, 15 Sep 2014 23:40:24 +0000 (01:40 +0200)]
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 c5560e72d0bb69f8a1ac9536570398f84388f396)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agoPrepare for 11 release v11
Diego Biurrun [Sat, 13 Sep 2014 18:14:46 +0000 (11:14 -0700)]
Prepare for 11 release

9 years agodoc: Fix syntax and logical errors in avconv stream combination example
Diego Biurrun [Wed, 10 Sep 2014 16:38:15 +0000 (18:38 +0200)]
doc: Fix syntax and logical errors in avconv stream combination example

Bug-Id: 661
CC: libav-stable@libav.org
(cherry picked from commit 775a0b04f0cf8102fe322b2ee03fe1a0633dea04)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agoFix RELEASE identification
Sean McGovern [Fri, 5 Sep 2014 05:04:21 +0000 (01:04 -0400)]
Fix RELEASE identification

This was accidentally left over in b5d4f49e3cb1a13642542f08c8c54791c3d54dfb

9 years agoMark 11 release in the changelog
Diego Biurrun [Tue, 2 Sep 2014 22:43:29 +0000 (00:43 +0200)]
Mark 11 release in the changelog

Also fix some typos in the entries for the 11 release.

(cherry picked from commit d9792b773516a560ecb99694b8ee745a50027fac)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agoAdd release notes for 11.
Anton Khirnov [Mon, 18 Aug 2014 18:04:47 +0000 (18:04 +0000)]
Add release notes for 11.

(cherry picked from commit 12f0388f9cb32016ac0dacaeca631b088b29bb96)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agoavcodec: fix missing doxygen comment marker
Michael Niedermayer [Sun, 31 Aug 2014 23:48:50 +0000 (00:48 +0100)]
avcodec: fix missing doxygen comment marker

9 years agoPrepare for 11_beta2 Release
Reinhard Tartler [Sat, 30 Aug 2014 15:51:28 +0000 (11:51 -0400)]
Prepare for 11_beta2 Release

9 years agolicense: Mention that vf_interlace is GPL, not LGPL
Diego Biurrun [Wed, 27 Aug 2014 11:14:20 +0000 (13:14 +0200)]
license: Mention that vf_interlace is GPL, not LGPL

(cherry picked from commit 9e8bbe7d4d1dcd5fec491dbfbb98ed2038a7bed5)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agomatroskaenc: convert avstream stereo3d side data during encoding
Vittorio Giovara [Tue, 5 Aug 2014 10:16:17 +0000 (11:16 +0100)]
matroskaenc: convert avstream stereo3d side data during encoding

Write the StereoMode Embl to bitstream.

9 years agomatroskadec: parse stereo mode on decoding
Vittorio Giovara [Tue, 12 Aug 2014 21:28:49 +0000 (22:28 +0100)]
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

9 years agoavcodec: add stream-level stereo3d side data
Vittorio Giovara [Wed, 23 Jul 2014 08:21:28 +0000 (09:21 +0100)]
avcodec: add stream-level stereo3d side data

9 years agomatroska: list supported extensions
Vittorio Giovara [Wed, 23 Jul 2014 08:49:24 +0000 (09:49 +0100)]
matroska: list supported extensions

9 years agodoc/APIchanges: fill in missing hashes and dates
Anton Khirnov [Sun, 18 May 2014 08:52:41 +0000 (10:52 +0200)]
doc/APIchanges: fill in missing hashes and dates

9 years agopulse: Add a wallclock option to be compatible with other other captures
Luca Barbato [Sat, 23 Aug 2014 17:03:21 +0000 (19:03 +0200)]
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 424b929b5cb9ca4094099f25179829260d4b0fa3)
(cherry picked from commit 404731bd20e1df5880e6fe381e975ba48afc75b2)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agovc1: Initialize start_code_found to 0
Luca Barbato [Wed, 27 Aug 2014 00:50:58 +0000 (02:50 +0200)]
vc1: Initialize start_code_found to 0

9 years agoavconv: fix parsing the AVOptions for -target
Anton Khirnov [Tue, 26 Aug 2014 06:26:35 +0000 (06:26 +0000)]
avconv: fix parsing the AVOptions for -target

CC: libav-stable@libav.org
(cherry picked from commit f5245a9c6206878b892adf3ccbccc9311c202af5)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoavconv: fix the muxrate values for -target
Anton Khirnov [Mon, 25 Aug 2014 21:24:35 +0000 (21:24 +0000)]
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 1688eef25385089026aba55da1885f70a57815ab)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agompegenc: limit the maximum muxrate
Anton Khirnov [Mon, 25 Aug 2014 21:21:57 +0000 (21:21 +0000)]
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 75bbaf2493a71ee66eaabe3c21fadd84d07888de)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agovc1: Fix the skip condition
Luca Barbato [Sun, 24 Aug 2014 17:34:13 +0000 (19:34 +0200)]
vc1: Fix the skip condition

As written in the comment above, skip must be added only if a
start code is found.

9 years agovfwcap: Add fallback define for HWND_MESSAGE
Diego Biurrun [Mon, 25 Aug 2014 15:26:15 +0000 (17:26 +0200)]
vfwcap: Add fallback define for HWND_MESSAGE

Some obsolete versions of the MinGW32 runtime (<4.0.0) lack the definition.

(cherry picked from commit ab56fabe6294524e99815451ad01e4ff50c6d734)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agosetpts: Add missing inttypes.h #include for PRId64
Diego Biurrun [Wed, 20 Aug 2014 16:54:50 +0000 (09:54 -0700)]
setpts: Add missing inttypes.h #include for PRId64

Also convert a debug av_log() to av_dlog().

(cherry picked from commit 593aaee953f8b07c141ff115e67bae85ef0350c7)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agompeg12enc: Add missing #include for PICT_FRAME
Diego Biurrun [Wed, 20 Aug 2014 16:48:54 +0000 (09:48 -0700)]
mpeg12enc: Add missing #include for PICT_FRAME

(cherry picked from commit 8fc6a70c2167b645b7a37d0cbc0e276e7b787cc9)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agoerror_resilience: Drop asserts from guess_mv()
Diego Biurrun [Wed, 20 Aug 2014 16:35:08 +0000 (09:35 -0700)]
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 7cb66ebc0be48489785f7166c9d15eac594b0763)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agovsrc_movie: Adjust a silly typo from b977b287f61fea48ecd6251d54a26334213b7ec6
Diego Biurrun [Wed, 20 Aug 2014 16:56:26 +0000 (09:56 -0700)]
vsrc_movie: Adjust a silly typo from b977b287f61fea48ecd6251d54a26334213b7ec6

(cherry picked from commit 11cd727fbd603197cb1e49654fce3352d56f8fd8)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years agoelectronicarts: do not fail on zero-sized chunks
Anton Khirnov [Wed, 20 Aug 2014 05:40:53 +0000 (05:40 +0000)]
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 4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoRevert "lavf: eliminate ff_get_audio_frame_size()"
Andrew Stone [Mon, 18 Aug 2014 21:28:23 +0000 (17:28 -0400)]
Revert "lavf: eliminate ff_get_audio_frame_size()"

This reverts commit 30e50c50274f88f0f5ae829f401cd3c7f5266719.

The original commit broke the ability to stream AAC over HTTP/Icecast. It looks
like avformat_find_stream_info() gets stuck in an infinite loop, never hitting
AVFormatContext.max_analyze_duration since duration is never set for any of
the packets.

Example stream: http://listen.classicrocklounge.com:8000/aac64

Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoavfilter: Remove unused variable from ff_get_video_buffer()
Diego Biurrun [Fri, 15 Aug 2014 20:13:09 +0000 (22:13 +0200)]
avfilter: Remove unused variable from ff_get_video_buffer()

9 years agovsrc_movie: Avoid a variable indirection in movie_get_frame()
Diego Biurrun [Fri, 15 Aug 2014 20:13:14 +0000 (22:13 +0200)]
vsrc_movie: Avoid a variable indirection in movie_get_frame()

This avoids an unused variable warning with MSVC since the variable is
only used in a debug mode printf statement.

9 years agopcm: Drop av_unused attribute from variable that is always used
Diego Biurrun [Fri, 15 Aug 2014 20:13:11 +0000 (22:13 +0200)]
pcm: Drop av_unused attribute from variable that is always used

9 years agopcm: Drop unused variable from DECODE_PLANAR macro
Diego Biurrun [Fri, 15 Aug 2014 20:13:10 +0000 (22:13 +0200)]
pcm: Drop unused variable from DECODE_PLANAR macro

9 years agovc1: Add missing parentheses to conditions in vc1_decode_b_mb_intfr()
Diego Biurrun [Fri, 15 Aug 2014 20:13:08 +0000 (22:13 +0200)]
vc1: Add missing parentheses to conditions in vc1_decode_b_mb_intfr()

9 years agovfwcap: Drop fallback VfW defines
Diego Biurrun [Fri, 15 Aug 2014 20:13:06 +0000 (22:13 +0200)]
vfwcap: Drop fallback VfW defines

The defines were added long ago when MinGW still lacked them.

9 years agomov: Drop unused parameter from ff_mov_read_esds()
Diego Biurrun [Fri, 15 Aug 2014 20:13:03 +0000 (22:13 +0200)]
mov: Drop unused parameter from ff_mov_read_esds()

This is cleaner and avoids an uninitialized variable warning with MSVC.