ffmpeg.git
5 years agoMerge commit 'ff409c7d80b6781e4b81dd860badb569061ddaa5' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:55:28 +0000 (15:55 +0200)]
Merge commit 'ff409c7d80b6781e4b81dd860badb569061ddaa5' into release/1.1

* commit 'ff409c7d80b6781e4b81dd860badb569061ddaa5':
  adx: check that the offset is not negative

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'c9be276f8b040e7d441a77f774afe94b6f137be6' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:54:30 +0000 (15:54 +0200)]
Merge commit 'c9be276f8b040e7d441a77f774afe94b6f137be6' into release/1.1

* commit 'c9be276f8b040e7d441a77f774afe94b6f137be6':
  mpegvideo: set reference/pict_type on generated reference frames

Conflicts:
libavcodec/mpegvideo.c

See: 532b93b51631ee58443bee8aec7c2a2b2a1746be
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'd8e89a37267f276afd404bd062e5112a336d1a36' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:33:23 +0000 (15:33 +0200)]
Merge commit 'd8e89a37267f276afd404bd062e5112a336d1a36' into release/1.1

* commit 'd8e89a37267f276afd404bd062e5112a336d1a36':
  h264: reset data partitioning at the beginning of each decode call

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7e8d27c8510a024e6d66d2e1116bb8692d9cb98a' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:29:29 +0000 (15:29 +0200)]
Merge commit '7e8d27c8510a024e6d66d2e1116bb8692d9cb98a' into release/1.1

* commit '7e8d27c8510a024e6d66d2e1116bb8692d9cb98a':
  h264: reset ref count if decoding the slice header fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7fd6c9fb49573870b48a995947edc83eedd7e86e' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:28:24 +0000 (15:28 +0200)]
Merge commit '7fd6c9fb49573870b48a995947edc83eedd7e86e' into release/1.1

* commit '7fd6c9fb49573870b48a995947edc83eedd7e86e':
  h264: reset first_field if frame_start() fails for missing refs

Conflicts:
libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '175b53d051cf9e17583106c828c35d169f335ea3' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:18:35 +0000 (15:18 +0200)]
Merge commit '175b53d051cf9e17583106c828c35d169f335ea3' into release/1.1

* commit '175b53d051cf9e17583106c828c35d169f335ea3':
  h264: limit allowed pred modes in ff_h264_check_intra_pred_mode() to 3

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: fix size of arrays in ff_h264_check_intra_pred_mode()
Michael Niedermayer [Fri, 21 Jun 2013 17:39:45 +0000 (19:39 +0200)]
h264: fix size of arrays in ff_h264_check_intra_pred_mode()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d6a33f5d20b6ef2eae2cbb959b001cb125a564b7)

Conflicts:

libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264/ff_h264_check_intra_pred_mode: fix input value check
Michael Niedermayer [Fri, 21 Jun 2013 17:51:30 +0000 (19:51 +0200)]
h264/ff_h264_check_intra_pred_mode: fix input value check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2005fddcbb4e18e8f7c34326e40609e4a2d83c31)

Conflicts:

libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7f604a048e9b6128cdf9ce7e95f21d1a9822ba39' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:15:19 +0000 (15:15 +0200)]
Merge commit '7f604a048e9b6128cdf9ce7e95f21d1a9822ba39' into release/1.1

* commit '7f604a048e9b6128cdf9ce7e95f21d1a9822ba39':
  h264: reject mismatching luma/chroma bit depths during sps parsing

Conflicts:
libavcodec/h264_ps.c

See: bdeb61ccc67911cfc5e20c7cfb1312d0501ca90a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7e513d85e80d730718695d09fcaf0295ae24699e' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:02:33 +0000 (15:02 +0200)]
Merge commit '7e513d85e80d730718695d09fcaf0295ae24699e' into release/1.1

* commit '7e513d85e80d730718695d09fcaf0295ae24699e':
  h264: check that execute_decode_slices() is not called too many times

See: 64591f8f86f2dfeac13ee6b4e971d069675ca814
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'b6a0f5cde808d84626f07b11c381cc6ef0954940' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 13:01:26 +0000 (15:01 +0200)]
Merge commit 'b6a0f5cde808d84626f07b11c381cc6ef0954940' into release/1.1

* commit 'b6a0f5cde808d84626f07b11c381cc6ef0954940':
  h264: do not use 422 functions for monochrome

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '1147d39bca135df8673031d16989ba486a52172a' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:45:04 +0000 (14:45 +0200)]
Merge commit '1147d39bca135df8673031d16989ba486a52172a' into release/1.1

* commit '1147d39bca135df8673031d16989ba486a52172a':
  h264: reset data_partitioning if decoding the slice header for NAL_DPA fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '30e58e65e543d04d5e52bf188b31abf4dd41a104' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:39:42 +0000 (14:39 +0200)]
Merge commit '30e58e65e543d04d5e52bf188b31abf4dd41a104' into release/1.1

* commit '30e58e65e543d04d5e52bf188b31abf4dd41a104':
  h264_refs: make sure not to write over the bounds of the default ref list

Conflicts:
libavcodec/h264_refs.c

See: 0a5ca63c24b8a07f94611637ba29e41b8b47ce24
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'af40847681b978441fdd25276685414f9e17820a' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:34:02 +0000 (14:34 +0200)]
Merge commit 'af40847681b978441fdd25276685414f9e17820a' into release/1.1

* commit 'af40847681b978441fdd25276685414f9e17820a':
  h264: check buffer size before accessing it

Conflicts:
libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'fc53a09909ae046dbe4d339bffc744cfc328253e' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:25:01 +0000 (14:25 +0200)]
Merge commit 'fc53a09909ae046dbe4d339bffc744cfc328253e' into release/1.1

* commit 'fc53a09909ae046dbe4d339bffc744cfc328253e':
  cmdutils: update copyright year to 2014.

Conflicts:
cmdutils.c

No change as the copyright year has already been fixed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '4c1e4bc6af1596995e895cd7da9f3b436051114c' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:24:15 +0000 (14:24 +0200)]
Merge commit '4c1e4bc6af1596995e895cd7da9f3b436051114c' into release/1.1

* commit '4c1e4bc6af1596995e895cd7da9f3b436051114c':
  Prepare for 9.13 Release

Conflicts:
RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'd791e8c990a752435d993df01516ebe469d94535' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:20:35 +0000 (14:20 +0200)]
Merge commit 'd791e8c990a752435d993df01516ebe469d94535' into release/1.1

* commit 'd791e8c990a752435d993df01516ebe469d94535':
  doc: Point to the correct, actually maintained gas-preprocessor repo

Conflicts:
doc/platform.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'f1a2364cebe472a98a5ea157071f4eee4429ce9f' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:19:35 +0000 (14:19 +0200)]
Merge commit 'f1a2364cebe472a98a5ea157071f4eee4429ce9f' into release/1.1

* commit 'f1a2364cebe472a98a5ea157071f4eee4429ce9f':
  Update Changelog for 9.12

Conflicts:
Changelog

Not merged, as the changelog does not apply to FFmpeg like this

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'b00444c0bbbc78ae477ec697d6569893609f420d' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:06:52 +0000 (14:06 +0200)]
Merge commit 'b00444c0bbbc78ae477ec697d6569893609f420d' into release/1.1

* commit 'b00444c0bbbc78ae477ec697d6569893609f420d':
  configure: Update freetype check to follow upstream

Conflicts:
configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoconfigure: Special case libfreetype test
Alexander Strasser [Fri, 6 Dec 2013 16:20:26 +0000 (17:20 +0100)]
configure: Special case libfreetype test

Include the freetype header, in-directly through a macro, like it
is done in the drawtext filter. Do not break if the header is moved.

Unfortunately the drawtext filter included the file where the include
macros are defined in a wrong way. This is not needed and breaks the
build. Remove that #include line too.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
(cherry picked from commit cea5812fa723c08b89d929eeba73462e05de2973)

Conflicts:

configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '29b3ca743dd02efbe00565c0b997e735e4daa772' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 12:02:06 +0000 (14:02 +0200)]
Merge commit '29b3ca743dd02efbe00565c0b997e735e4daa772' into release/1.1

* commit '29b3ca743dd02efbe00565c0b997e735e4daa772':
  drawtext: Drop pointless header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'a32e45df82751784f9461f01310e63f4bed721dc' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 11:56:06 +0000 (13:56 +0200)]
Merge commit 'a32e45df82751784f9461f01310e63f4bed721dc' into release/1.1

* commit 'a32e45df82751784f9461f01310e63f4bed721dc':
  configure: Support preprocessor macros as header names

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7a2254ab26b24255a4d6ea476ba5fd38525a9bb3' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 11:55:34 +0000 (13:55 +0200)]
Merge commit '7a2254ab26b24255a4d6ea476ba5fd38525a9bb3' into release/1.1

* commit '7a2254ab26b24255a4d6ea476ba5fd38525a9bb3':
  arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'cb95c1935f43ee6ae7fd15439df0f674e809f180' into release/1.1
Michael Niedermayer [Mon, 21 Apr 2014 11:32:22 +0000 (13:32 +0200)]
Merge commit 'cb95c1935f43ee6ae7fd15439df0f674e809f180' into release/1.1

* commit 'cb95c1935f43ee6ae7fd15439df0f674e809f180':
  qt-faststart: Check offset_count before reading from the moov_atom buffer

Conflicts:
tools/qt-faststart.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoadx: check that the offset is not negative
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
adx: check that the offset is not negative

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 5569146d48f06564e8fa393424782cceed510916)

5 years agompegvideo: set reference/pict_type on generated reference frames
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
mpegvideo: set reference/pict_type on generated reference frames

Otherwise the generic code will unref them, which can then result in
last_picture_ptr == current_picture_ptr, which causes deadlocks at least
in rv40.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: reset data partitioning at the beginning of each decode call
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset data partitioning at the beginning of each decode call

Prevents using GetBitContexts with data from previous calls.

Fixes access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: reset ref count if decoding the slice header fails
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset ref count if decoding the slice header fails

Otherwise the ER code might try to use some already freed references.

Fixes possible access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: reset first_field if frame_start() fails for missing refs
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset first_field if frame_start() fails for missing refs

In this case we may not have a current frame, while first_field being
set implies we do.

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: limit allowed pred modes in ff_h264_check_intra_pred_mode() to 3
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: limit allowed pred modes in ff_h264_check_intra_pred_mode() to 3

Higher modes are not allowed for 16x16/chroma, which is what this
function is used for. Otherwise this function would return 0 (vertical
prediction) for invalid higher modes, which could result in invalid
reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: reject mismatching luma/chroma bit depths during sps parsing
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reject mismatching luma/chroma bit depths during sps parsing

There is no point in delaying the check and it avoids bugs with a
half-initialized context.

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: check that execute_decode_slices() is not called too many times
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: check that execute_decode_slices() is not called too many times

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 9eef9eb3014b2ed9c3ff4aac510a9f04edb555cf)

5 years agoh264: do not use 422 functions for monochrome
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: do not use 422 functions for monochrome

Fixes invalid memory access.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: reset data_partitioning if decoding the slice header for NAL_DPA fails
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset data_partitioning if decoding the slice header for NAL_DPA fails

If it was set before then we can end up trying to decode a slice without
a valid slice header, which can lead to invalid memory access.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 58312b2472d3a44d7458865c459d59ef2e02bf1a)

5 years agoh264_refs: make sure not to write over the bounds of the default ref list
Anton Khirnov [Fri, 15 Nov 2013 18:06:23 +0000 (19:06 +0100)]
h264_refs: make sure not to write over the bounds of the default ref list

Fixes invalid writes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agoh264: check buffer size before accessing it
Anton Khirnov [Fri, 15 Nov 2013 09:15:24 +0000 (10:15 +0100)]
h264: check buffer size before accessing it

Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

5 years agocmdutils: update copyright year to 2014.
Johan Andersson [Sat, 4 Jan 2014 19:47:32 +0000 (20:47 +0100)]
cmdutils: update copyright year to 2014.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 7ce88e5ec41484c452da56853a6897803da9c2a5)

5 years agoPrepare for 9.13 Release
Reinhard Tartler [Sat, 29 Mar 2014 17:10:29 +0000 (13:10 -0400)]
Prepare for 9.13 Release

5 years agoavformat/mov: fix keyframe flags for sample from chromium Issue 340865
Michael Niedermayer [Wed, 12 Feb 2014 05:32:51 +0000 (06:32 +0100)]
avformat/mov: fix keyframe flags for sample from chromium Issue 340865

Fixes ticket #3362.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a0911b059763b8f13c70adcbbe71e10382855104)

5 years agoavformat/mov: only force parsing for video tracks if stss is empty
Hendrik Leppkes [Mon, 4 Nov 2013 15:22:27 +0000 (16:22 +0100)]
avformat/mov: only force parsing for video tracks if stss is empty

Fixes playback of some AAC streams, which are otherwise mangled by the
parser, and stss is typically only valid for video anyway.

Fixes a regression since e41ea866.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 019247bdc326a90bf20d3ce5d2413cc642e8bb08)

5 years agodoc: Point to the correct, actually maintained gas-preprocessor repo
Martin Storsjö [Wed, 12 Mar 2014 11:46:04 +0000 (13:46 +0200)]
doc: Point to the correct, actually maintained gas-preprocessor repo

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d15c536123a44362ace6299c391a492c90b83fc7)
Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoUpdate Changelog for 9.12
Reinhard Tartler [Fri, 14 Mar 2014 00:57:03 +0000 (20:57 -0400)]
Update Changelog for 9.12

5 years agoconfigure: Update freetype check to follow upstream
Luca Barbato [Sat, 21 Dec 2013 16:59:59 +0000 (17:59 +0100)]
configure: Update freetype check to follow upstream

The freetype tutorial suggests to use #include FT_FREETYPE_H.

Bug-Id: 616
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit e61b8fa5605b16a02a2a0ea75afbfc31d7832bba)

5 years agodrawtext: Drop pointless header
Luca Barbato [Sun, 5 Jan 2014 11:30:45 +0000 (12:30 +0100)]
drawtext: Drop pointless header

It should be forward compatible with newer freetype.

(cherry picked from commit d68dc3c9446e38b4d686cc0f55433c9e8d7c128b)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoconfigure: Support preprocessor macros as header names
Diego Biurrun [Mon, 23 Dec 2013 00:03:48 +0000 (01:03 +0100)]
configure: Support preprocessor macros as header names

New versions of FreeType have moved the location of their API
header(s) and hide the location behind a macro.

Since the location changes between versions and no other way
to know the location exists, this workaround becomes necessary.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 52ccc4a0ece88030e67254418317d72089a0ecc8)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoarm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
Janne Grunau [Sat, 8 Mar 2014 10:52:14 +0000 (11:52 +0100)]
arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6

The overread avoidance fix in cbddee1cca0ebd01e8c5aa694d31228eb4de4b41
broke the computation for the last row since it prevented the safe
reading from the height+1-th row.

5 years agoqt-faststart: Check offset_count before reading from the moov_atom buffer
Michael Niedermayer [Thu, 13 Dec 2012 14:07:20 +0000 (15:07 +0100)]
qt-faststart: Check offset_count before reading from the moov_atom buffer

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit bb95334c34d0d9abccea370ae25c4765d7764ab8)
(cherry picked from commit 7754d4838178a5c09c3c3953bb2b90d1abc639e3)

5 years agoupdate for 1.1.9 n1.1.9
Michael Niedermayer [Fri, 7 Mar 2014 03:14:03 +0000 (04:14 +0100)]
update for 1.1.9

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/utvideoenc: fix slice_bits size
Michael Niedermayer [Sat, 1 Mar 2014 01:40:19 +0000 (02:40 +0100)]
avcodec/utvideoenc: fix slice_bits size

Fixes assertion failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0a8c90202bb906747168a698b6837496f82c717c)

Conflicts:

libavcodec/utvideoenc.c
(cherry picked from commit 57522ca79cc38c279123596d3288ddbf56fa8903)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/snow: split block clipping checks
Michael Niedermayer [Tue, 18 Feb 2014 01:53:14 +0000 (02:53 +0100)]
avcodec/snow: split block clipping checks

Fixes out of array read
Fixes: d4476f68ca1c1c57afbc45806f581963-asan_heap-oob_2266b27_8607_cov_4044577381_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 61d59703c91869f4e5cdacd8d6be52f8b89d4ba4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ansi: fix integer overflow
Michael Niedermayer [Mon, 17 Feb 2014 19:49:42 +0000 (20:49 +0100)]
avcodec/ansi: fix integer overflow

Fixes out of array read
Fixes: 5f9698e86d92f19bb08d54ff0d57027f-signal_sigsegv_b30756_3795_cov_2693691257_ansi256.ans
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d42ec8433c687fcbccefa51a7716d81920218e4f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/msrle: use av_image_get_linesize() to calculate the linesize
Michael Niedermayer [Sun, 16 Feb 2014 22:08:52 +0000 (23:08 +0100)]
avcodec/msrle: use av_image_get_linesize() to calculate the linesize

Fixes out of array access
Fixes: 14a74a0a2dc67ede543f0e35d834fbbe-asan_heap-oob_49572c_556_cov_215466444_44_001_engine_room.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c919e1ca2ecfc47d796382973ba0e48b8f6f92a2)

Conflicts:

libavcodec/msrle.c
(cherry picked from commit bc1c8ec5e65098fd2ccd8456f667151dfc9cda42)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mpegtsenc: Check data array size in mpegts_write_pmt()
Michael Niedermayer [Thu, 13 Feb 2014 12:59:51 +0000 (13:59 +0100)]
avformat/mpegtsenc: Check data array size in mpegts_write_pmt()

Prevents out of array writes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 842b6c14bcfc1c5da1a2d288fd65386eb8c158ad)

Conflicts:

libavformat/mpegtsenc.c
(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/wmalosslessdec: fix mclms_coeffs* array size
Michael Niedermayer [Fri, 7 Feb 2014 14:07:23 +0000 (15:07 +0100)]
avcodec/wmalosslessdec: fix mclms_coeffs* array size

Fixes corruption of context
Fixes: 8835659dde6a4f7dcdf341de6a45c6c8-signal_sigsegv_1dce67b_4564_cov_2504444599_classical_22_16_1_14000_v3c_0_extend_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ec9578d54d09b64bf112c2bf7a34b1ef3b93dbd3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavdevice/v4l2: only use average frame rate if set
Michael Niedermayer [Sat, 1 Feb 2014 23:11:16 +0000 (00:11 +0100)]
avdevice/v4l2: only use average frame rate if set

It might be unset on some platforms with some drivers and some input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0997c2504b25cbc2856800fc063395dcd40b2bf7)

Conflicts:

libavdevice/v4l2.c

5 years agoavdevice/v4l2: only use frame period from v4l2 if valid
Michael Niedermayer [Sat, 1 Feb 2014 23:10:43 +0000 (00:10 +0100)]
avdevice/v4l2: only use frame period from v4l2 if valid

There is evidence that some drivers do not set a valid value

See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718805
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4aa4533ee8b51a1e6bdc4fbffaf90aa2b14e2c9f)

Conflicts:

libavdevice/v4l2.c

5 years agoavutil/log: skip IO calls on empty strings
Michael Niedermayer [Fri, 6 Dec 2013 22:30:34 +0000 (23:30 +0100)]
avutil/log: skip IO calls on empty strings

These occur when no context is set for example, thus they are common

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a044a183a3fb90b20a8deaa3ea1158510bcdd420)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/libopusenc: change default frame duration to 20 ms
Paul B Mahol [Fri, 15 Nov 2013 01:09:06 +0000 (01:09 +0000)]
avcodec/libopusenc: change default frame duration to 20 ms

20 ms is used by libopus encoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 74906d3727ec3bd9b7b28dfa7a98ff6e8cf8b6d7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/jpeglsdec: check err value for ls_get_code_runterm()
Michael Niedermayer [Wed, 30 Oct 2013 22:27:28 +0000 (23:27 +0100)]
avcodec/jpeglsdec: check err value for ls_get_code_runterm()

Fixes infinite loop
Fixes Ticket3086

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc0e47b55096361723b364afa43b79a3f5619cdc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavutil/opt: initialize ret
Michael Niedermayer [Sun, 20 Oct 2013 16:38:48 +0000 (18:38 +0200)]
avutil/opt: initialize ret

Fixes CID1108610
Fixes use of uninitialized variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2d8ccf0adcae09cb9e14b01cfe20e4d77c3bbf5d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized
Michael Niedermayer [Sat, 19 Oct 2013 15:45:54 +0000 (17:45 +0200)]
avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 240fd8c96f59ebe9dcfc4152a1086cd3f63400c0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1e48318802b3caa493a40c0584afc30cc866d9d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Fri, 7 Mar 2014 02:59:11 +0000 (03:59 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  arm: hpeldsp: prevent overreads in armv6 asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '798c715f4fa5cde37456af6202a32ee62cfb96d9' into release/1.1
Michael Niedermayer [Fri, 7 Mar 2014 02:54:51 +0000 (03:54 +0100)]
Merge commit '798c715f4fa5cde37456af6202a32ee62cfb96d9' into release/1.1

* commit '798c715f4fa5cde37456af6202a32ee62cfb96d9':
  configure: enable PIC on s390(x)
  ituh263: reject b-frame with pp_time = 0
  lagarith: reallocate rgb_planes when needed
  truemotion1: check the header size
  shorten: pad the internal bitstream buffer
  samplefmt: avoid integer overflow in av_samples_get_buffer_size()

Conflicts:
libavcodec/lagarith.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '8883b5f85bfe35509633bc590d19b6a1b495690e' into release/1.1
Michael Niedermayer [Fri, 7 Mar 2014 02:09:32 +0000 (03:09 +0100)]
Merge commit '8883b5f85bfe35509633bc590d19b6a1b495690e' into release/1.1

* commit '8883b5f85bfe35509633bc590d19b6a1b495690e':
  h264: Fix a typo from the previous commit
  h264: Lower bound check for slice offsets
  Add missing header to fix compilation after d2a0654
  Prepare for 9.12 RELEASE
  configure: Add missing dependency of Snow decoder on videodsp
  rpza: limit the number of blocks to the total remaining blocks in the frame

Conflicts:
RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoarm: hpeldsp: prevent overreads in armv6 asm
Janne Grunau [Wed, 5 Mar 2014 11:44:57 +0000 (12:44 +0100)]
arm: hpeldsp: prevent overreads in armv6 asm

Based on a patch by Russel King <rmk+libav@arm.linux.org.uk>

Bug-Id: 646
CC: libav-stable@libav.org
5 years agoconfigure: enable PIC on s390(x)
Reinhard Tartler [Sun, 2 Mar 2014 07:11:05 +0000 (02:11 -0500)]
configure: enable PIC on s390(x)

The s390 architecture requires shared libraries to be built in PIC mode.
Otherwise applications will get wrong relocations at run-time, leading
to confusing segmentation faults.

CC: libav-stable@libav.org
(cherry picked from commit 5ddc9f5052316608799b932c604f9e7561f8ce24)
(cherry picked from commit 7509c2c4ea2180733cc60ab1a0e0fe4ce2f02a69)

5 years agoituh263: reject b-frame with pp_time = 0
Keiji Costantini [Sat, 1 Mar 2014 18:17:04 +0000 (18:17 +0000)]
ituh263: reject b-frame with pp_time = 0

Avoid a division by 0 in ff_mpeg4_set_one_direct_mv.

Sample-Id: 00000168-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
(cherry picked from commit 9514440337875e0c63b409abcd616b68c518283f)
(cherry picked from commit 5df52b0131d3d4d804ad6e221bc9a2cd8b201ef2)

5 years agoh264: Fix a typo from the previous commit
Luca Barbato [Sat, 22 Feb 2014 10:19:03 +0000 (11:19 +0100)]
h264: Fix a typo from the previous commit

f777504f640260337974848c7d5d7a3f064bbb45 changed a - in +

CC: libav-stable@libav.org
(cherry picked from commit d922c5a5fbaf0b6c73bd8c81ae059bc6e406961c)
(cherry picked from commit 3ce77e04c2ca4b9e7fa6b94b51e8d7c5f188da86)

5 years agolagarith: reallocate rgb_planes when needed
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
lagarith: reallocate rgb_planes when needed

Fixes invalid writes on pixel format changes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 4c3e1956ee35fdcc5ffdb28782050164b4623c0b)

5 years agoh264: Lower bound check for slice offsets
Vittorio Giovara [Thu, 20 Feb 2014 01:38:32 +0000 (02:38 +0100)]
h264: Lower bound check for slice offsets

And use the value from the specification.

Sample-Id: 00000451-google
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit f777504f640260337974848c7d5d7a3f064bbb45)
(cherry picked from commit 5bd083d0216d9ee649039c84999fb61386536ac1)

Conflicts:
libavcodec/h264.c

5 years agotruemotion1: check the header size
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
truemotion1: check the header size

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 2240e2078d53d3cfce8ff1dda64e58fa72038602)

5 years agoshorten: pad the internal bitstream buffer
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
shorten: pad the internal bitstream buffer

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 1713eec29add37b654ec6bf262b843d139c1ffc6)

5 years agosamplefmt: avoid integer overflow in av_samples_get_buffer_size()
Justin Ruggles [Thu, 30 Jan 2014 19:08:38 +0000 (14:08 -0500)]
samplefmt: avoid integer overflow in av_samples_get_buffer_size()

CC:libav-stable@libav.org
(cherry picked from commit 0e830094ad0dc251613a0aa3234d9c5c397e02e6)

5 years agoAdd missing header to fix compilation after d2a0654
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
Add missing header to fix compilation after d2a0654

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoPrepare for 9.12 RELEASE
Reinhard Tartler [Sat, 1 Mar 2014 00:22:56 +0000 (19:22 -0500)]
Prepare for 9.12 RELEASE

5 years agoconfigure: Add missing dependency of Snow decoder on videodsp
Diego Biurrun [Fri, 21 Feb 2014 09:31:39 +0000 (10:31 +0100)]
configure: Add missing dependency of Snow decoder on videodsp

5 years agorpza: limit the number of blocks to the total remaining blocks in the frame
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
rpza: limit the number of blocks to the total remaining blocks in the frame

Fixes invalid writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 77bb0004bbe18f1498cfecdc68db5f10808b6599)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Tue, 4 Feb 2014 05:41:15 +0000 (06:41 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  Update Changelog for 9.11
  oggparseogm: check timing variables
  mathematics: remove asserts from av_rescale_rnd()
  vc1: Always reset numref when parsing a new frame header.
  h264: reset num_reorder_frames if it is invalid

Conflicts:
Changelog
libavcodec/vc1.c
libavutil/mathematics.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '62ed6da016b789eee00e0fff517df4a254e12e5d' into release/1.1
Michael Niedermayer [Tue, 4 Feb 2014 05:32:39 +0000 (06:32 +0100)]
Merge commit '62ed6da016b789eee00e0fff517df4a254e12e5d' into release/1.1

* commit '62ed6da016b789eee00e0fff517df4a254e12e5d':
  h264: check that an IDR NAL only contains I slices
  mov: Free an earlier allocated array if allocating a new one

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '44079902c49e526f464bb4eb855665e1af867e91' into release/1.1
Michael Niedermayer [Tue, 4 Feb 2014 05:17:49 +0000 (06:17 +0100)]
Merge commit '44079902c49e526f464bb4eb855665e1af867e91' into release/1.1

* commit '44079902c49e526f464bb4eb855665e1af867e91':
  mov: Free intermediate arrays in the normal cleanup function
  segafilm: fix leaks if reading the header fails
  h264_cavlc: check the size of the intra PCM data.
  h263: Check init_get_bits return value
  cavsdec: check ff_get_buffer() return value

Conflicts:
libavcodec/cavsdec.c
libavcodec/h263dec.c
libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'c85e5f13f6ac9c4c90125e7671d89009e57f9df9' into release/1.1
Michael Niedermayer [Tue, 4 Feb 2014 05:05:36 +0000 (06:05 +0100)]
Merge commit 'c85e5f13f6ac9c4c90125e7671d89009e57f9df9' into release/1.1

* commit 'c85e5f13f6ac9c4c90125e7671d89009e57f9df9':
  cavs: Check for negative cbp
  avi: DV in AVI must be considered single stream
  vmnc: Check the cursor dimensions
  vmnc: Port to bytestream2

Conflicts:
libavcodec/cavsdec.c
libavcodec/vmnc.c
libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'f1476459b7013d306eb911573f1dc81e74ccd082' into release/1.1
Michael Niedermayer [Tue, 4 Feb 2014 04:43:42 +0000 (05:43 +0100)]
Merge commit 'f1476459b7013d306eb911573f1dc81e74ccd082' into release/1.1

* commit 'f1476459b7013d306eb911573f1dc81e74ccd082':
  vmnc: K&R formatting cosmetics
  flashsv: Check diff_start diff_height values
  dsputil/pngdsp: fix signed/unsigned type in end comparison

Conflicts:
libavcodec/dsputil.c
libavcodec/flashsv.c
libavcodec/vmnc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/utils: av_probe_input_buffer2 decrease difference to libav
Michael Niedermayer [Mon, 13 Jan 2014 21:37:31 +0000 (22:37 +0100)]
avformat/utils: av_probe_input_buffer2 decrease difference to libav

This removes the initialization of 2 unused fields
The change was part of c1868e7ee7b07b40a0fe15f50df89fe499a01a50
but wasnt merged as the fields could still be used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05c78f345b623a3eed203ab17da6e1419d56abd0)

Conflicts:

libavformat/utils.c

5 years agoavformat/utils/av_probe_input_buffer2: fix buffer passed to ffio_rewind_with_probe_data()
Michael Niedermayer [Mon, 13 Jan 2014 21:17:12 +0000 (22:17 +0100)]
avformat/utils/av_probe_input_buffer2: fix buffer passed to ffio_rewind_with_probe_data()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05886c9d4edddb07a4cdc6afee8b30cd9c80b4db)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/utils/av_probe_input_buffer2: fix offset check
Michael Niedermayer [Mon, 13 Jan 2014 21:17:12 +0000 (22:17 +0100)]
avformat/utils/av_probe_input_buffer2: fix offset check

The check could fail if avio_read() read less than requested

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8c3b026a0eeb49464d957b61b0c01cceecc416fd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/utils/av_probe_input_buffer2: Fix pd.buf_size
Michael Niedermayer [Mon, 13 Jan 2014 21:14:02 +0000 (22:14 +0100)]
avformat/utils/av_probe_input_buffer2: Fix pd.buf_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a2064820b52568c05a9ec8f418f18840e7c43cc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '8575f5362f98c937758b20ff8512d6767a56208e' into release/1.1
Michael Niedermayer [Tue, 4 Feb 2014 04:17:38 +0000 (05:17 +0100)]
Merge commit '8575f5362f98c937758b20ff8512d6767a56208e' into release/1.1

* commit '8575f5362f98c937758b20ff8512d6767a56208e':
  lavf: make av_probe_input_buffer more robust
  lavf: use a fixed width type
  lavf: simplify handling of offset in av_probe_input_buffer()

Conflicts:
libavformat/utils.c

See: cdce0e8a506cafebe47736d891f5b645b57d14b2 and previous commits
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/utils: fix av_probe_input_buffer2() so it returns the probe score
Michael Niedermayer [Wed, 28 Aug 2013 23:07:57 +0000 (01:07 +0200)]
avformat/utils: fix av_probe_input_buffer2() so it returns the probe score

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c4810fbe4f53d312ba70f251f7ee4f484cbca565)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/vc1: reset fcm/field_mode in non advanced header parsing
Michael Niedermayer [Sat, 1 Feb 2014 18:04:37 +0000 (19:04 +0100)]
avcodec/vc1: reset fcm/field_mode in non advanced header parsing

Fixes NULL pointer dereference
Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b51e9354772de446e8196dabf9aad1567b22f74d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/takdec: always check bits_per_raw_sample
Michael Niedermayer [Fri, 31 Jan 2014 18:16:02 +0000 (19:16 +0100)]
avcodec/takdec: always check bits_per_raw_sample

Fixes out of array access
Fixes: asan_heap-oob_19c7a94_6470_cov_1453611734_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f58eab151214d2d35ff0973f2b3e51c5eb372da4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/vmnc: Check that rectangles are within the picture
Michael Niedermayer [Mon, 20 Jan 2014 17:08:18 +0000 (18:08 +0100)]
avcodec/vmnc: Check  that rectangles are within the picture

Prevents out of array accesses with CODEC_FLAG_EMU_EDGE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6ba02602aa7fc7d38db582e75b8b093fb3c1608d)

Conflicts:

libavcodec/vmnc.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7c17207ab9acfaa934e8feb8fba90765c9d0b989)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodnxhdenc: fix mb_rc size
Michael Niedermayer [Fri, 17 Jan 2014 19:09:48 +0000 (20:09 +0100)]
dnxhdenc: fix mb_rc size

Fixes out of array access with RC_VARIANCE set to 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f1caaa1c61310beba705957e6366f0392a0b005b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agocmdutils: update year
Michael Niedermayer [Thu, 16 Jan 2014 01:53:32 +0000 (02:53 +0100)]
cmdutils: update year

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoUpdate Changelog for 9.11
Reinhard Tartler [Sun, 2 Feb 2014 18:08:08 +0000 (13:08 -0500)]
Update Changelog for 9.11

5 years agoh264: check that an IDR NAL only contains I slices
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: check that an IDR NAL only contains I slices

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 8b2e5e42bb9d6a59ede5af2e6df4aaf7750d1195)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agooggparseogm: check timing variables
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
oggparseogm: check timing variables

Fixes a potential divide by zero.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 75647dea6f7db79b409bad66a119f5c73da730f3)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agomathematics: remove asserts from av_rescale_rnd()
Anton Khirnov [Thu, 12 Dec 2013 06:34:13 +0000 (07:34 +0100)]
mathematics: remove asserts from av_rescale_rnd()

It is a public function, it must not assert on its parameters.

(cherry picked from commit 94a417acc05cc5151b473abc0bf51fad26f8c5a0)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agovc1: Always reset numref when parsing a new frame header.
Michael Niedermayer [Sun, 19 Jan 2014 15:28:25 +0000 (15:28 +0000)]
vc1: Always reset numref when parsing a new frame header.

Fixes an issue where the B-frame coding mode switches from interlaced
fields to interlaced frames, causing incorrect decisions in the motion
compensation code and resulting in visual artifacts.

CC: libav-stable@libav.org
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
(cherry picked from commit dd2d0039b6405dc724e4fef0d5b8f49530eea3aa)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoh264: reset num_reorder_frames if it is invalid
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset num_reorder_frames if it is invalid

An invalid VUI is not considered a fatal error, so the SPS containing it
may still be used. Leaving an invalid value of num_reorder_frames there
can result in writing over the bounds of H264Context.delayed_pic.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 9ecabd7892ff073ae60ded3fc0a1290f5914ed5c)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/h264_ps.c

5 years agomov: Free intermediate arrays in the normal cleanup function
Martin Storsjö [Mon, 13 Jan 2014 12:43:23 +0000 (14:43 +0200)]
mov: Free intermediate arrays in the normal cleanup function

These arrays are normally freed at the end of mov_read_trak,
but make sure they're freed in case mov_read_trak returned
early (due to errors) or in case the atoms that allocate arrays
are encountered at some other point than within a trak (which
we don't have checks against).

Sample-Id: 00000496-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d51f09962d5b4bc999fb70c040f330dd1873212e)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>