ffmpeg.git
6 years agoFix Win64 AVX h264_deblock by not using redzone on Win64 n1.1.3
Matt Wolenetz [Fri, 15 Feb 2013 21:59:40 +0000 (13:59 -0800)]
Fix Win64 AVX h264_deblock by not using redzone on Win64

Thanks-to: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 82a4a4e7caa96cea9aa2185c4c3110a5e9fde7c2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoupdate for 1.1.3
Michael Niedermayer [Fri, 22 Feb 2013 21:53:53 +0000 (22:53 +0100)]
update for 1.1.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomatroska: fix missing ,
Andrea3000 [Thu, 21 Feb 2013 21:24:26 +0000 (22:24 +0100)]
matroska: fix missing ,

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoh264: check that luma and chroma depth match
Michael Niedermayer [Thu, 21 Feb 2013 14:00:59 +0000 (15:00 +0100)]
h264: check that luma and chroma depth match

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bdeb61ccc67911cfc5e20c7cfb1312d0501ca90a)

Conflicts:

libavcodec/h264_ps.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec_decode_audio4: check got_frame_ptr before handling initial skip
Michael Niedermayer [Thu, 21 Feb 2013 21:00:19 +0000 (22:00 +0100)]
avcodec_decode_audio4: check got_frame_ptr before handling initial skip

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8a6449167a6da8cb747cfe3502ae86ffaac2ed48)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoh264: ensure that get_format() is called when changing format but not otherwise.
Michael Niedermayer [Thu, 21 Feb 2013 01:46:02 +0000 (02:46 +0100)]
h264: ensure that get_format() is called when changing format but not otherwise.

Fixes Ticket2288

Tested-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 04220b473e9d7b22d737405348f9904f22bcfb96)

Conflicts:

libavcodec/h264.c

6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Fri, 22 Feb 2013 21:44:15 +0000 (22:44 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  doc: Fix some obsolete references to av* tools as ff* tools
  vqavideo: check chunk sizes before reading chunks
  roqvideodec: check dimensions validity
  qdm2: check array index before use, fix out of array accesses
  mpegvideo: Do REBASE_PICTURE with byte pointers

Conflicts:
libavcodec/qdm2.c
libavcodec/roqvideodec.c
libavcodec/vqavideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoFix bits_per_coded_sample when encoding png with frame-level multithreading.
Carl Eugen Hoyos [Wed, 20 Feb 2013 21:54:21 +0000 (22:54 +0100)]
Fix bits_per_coded_sample when encoding png with frame-level multithreading.

Fixes ticket #2290.
(cherry picked from commit c4dc6c4c86a052b7ba53fa7ae0c1b0643ad70d0b)

6 years agodoc: Fix some obsolete references to av* tools as ff* tools
Vicente Jimenez Aguilar [Sat, 16 Feb 2013 02:08:36 +0000 (03:08 +0100)]
doc: Fix some obsolete references to av* tools as ff* tools

Signed-off-by: Diego Biurrun <diego@biurrun.de>
CC: libav-stable@libav.org
(cherry picked from commit 202b5f6deb65e405b07b9b5c20f97c8cb925cf49)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agovqavideo: check chunk sizes before reading chunks
Michael Niedermayer [Fri, 25 Jan 2013 05:11:59 +0000 (06:11 +0100)]
vqavideo: check chunk sizes before reading chunks

Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)

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

CC: libav-stable@libav.org
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit f7d18deb73d1dd1b27b2c7062c9a10d168a6c62a)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoroqvideodec: check dimensions validity
Michael Niedermayer [Thu, 29 Nov 2012 14:18:17 +0000 (15:18 +0100)]
roqvideodec: check dimensions validity

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ae610451170cd5a28b33950006ff0bd23036845)

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

CC: libav-stable@libav.org
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 488f87be873506abb01d67708a67c10a4dd29283)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoqdm2: check array index before use, fix out of array accesses
Michael Niedermayer [Fri, 30 Nov 2012 22:59:40 +0000 (23:59 +0100)]
qdm2: check array index before use, fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a7ee6281f7ef1c29284e3a4cadfe0f227ffde1ed)

CC: libav-stable@libav.org
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 39bec05ed42e505d17877b0c23f16322f9b5883b)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agompegvideo: Do REBASE_PICTURE with byte pointers
Martin Storsjö [Thu, 31 Jan 2013 08:19:57 +0000 (10:19 +0200)]
mpegvideo: Do REBASE_PICTURE with byte pointers

REBASE_PICTURE (more specifically, this half of it) takes a Picture
pointer that points into one larger struct, finds the offset of
that Picture within the struct and finds the corresponding field
within another instance of a similar struct.

The pointer difference "pic - (Picture*)old_ctx" is a value given
in sizeof(Picture) units, and when applied back on
(Picture*)new_ctx gets multiplied back with sizeof(Picture). Many
compilers seem to optimize out this division/multiplication, but
not all do.

GCC 4.2 on OS X doesn't seem to remove the division/multiplication,
therefore the new pointer didn't turn out to point to exactly
the right place in the new struct since it only had sizeof(Picture)
granularity (and the Picture is not aligned on a sizeof(Picture)
boundary within the encompassing struct). This bug has been present
before 47318953d as well - with H264, pointers to h->ref_list[0][0]
pointed to 88 bytes before h->ref_list[0][0] after the rebase. After
shrinking Picture, the difference ended up even larger, making
writes via such a Picture pointer overwrite other fields at random
in H264Context, ending up in crashes later.

This fixes H264 multithreaded decoding on OS X with GCC 4.2.

Fixes Bug: #439

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoswr: check channel layouts before using them.
Michael Niedermayer [Wed, 13 Feb 2013 16:49:16 +0000 (17:49 +0100)]
swr: check channel layouts before using them.

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 21cd905cd44a4bbafe8631bbaa6021d328413ce5)

Conflicts:

libswresample/swresample.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoshorten: dont leave invalid channel counts in the context.
Michael Niedermayer [Wed, 13 Feb 2013 00:03:30 +0000 (01:03 +0100)]
shorten: dont leave invalid channel counts in the context.

Fixes freeing invalid addresses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4f1279154ee9baf2078241bf5619774970d18b25)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agotiff: Check buffer allocation and pointer increment more carefully in shorts2str...
Michael Niedermayer [Tue, 12 Feb 2013 22:40:24 +0000 (23:40 +0100)]
tiff: Check buffer allocation and pointer increment more carefully in shorts2str() and double2str()

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e1219cdaf9fb4bc8cea410e1caf802373c1bfe51)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agopngdec/filter: dont access out of array elements at the end
Michael Niedermayer [Tue, 12 Feb 2013 18:53:40 +0000 (19:53 +0100)]
pngdec/filter: dont access out of array elements at the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1ac0fa50eff30d413206cffa5f47f7fe6d4849b1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agosanm: Use the correct height variable in the decoded_size checks
Michael Niedermayer [Tue, 12 Feb 2013 01:03:28 +0000 (02:03 +0100)]
sanm: Use the correct height variable in the decoded_size checks

Fixes integer overflow and out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5260edee7e5bd975837696c8c8c1a80eb2fbd7c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agosanm: add forgotten check for decoded_size in old_codec37()
Michael Niedermayer [Tue, 12 Feb 2013 00:09:03 +0000 (01:09 +0100)]
sanm: add forgotten check for decoded_size in old_codec37()

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 365270aec5c2b9284230abc702b11168818f14cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agotarga: Fix y check in advance_line
Michael Niedermayer [Sat, 9 Feb 2013 19:49:32 +0000 (20:49 +0100)]
targa: Fix y check in advance_line

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 796012af6c780b5b13ebca39a491f215515a18fe)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavfi/kerndeint: use av_pix_fmt_desc_get instead of directly accessing the table
Hendrik Leppkes [Fri, 15 Feb 2013 14:53:54 +0000 (15:53 +0100)]
lavfi/kerndeint: use av_pix_fmt_desc_get instead of directly accessing the table

Fixes FATE in MSVC DLL builds.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Tue, 19 Feb 2013 00:19:31 +0000 (01:19 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  svq3: unbreak decoding
  build: make audio_frame_queue a stand-alone component
  build: The libopencore-amrnb encoder depends on audio_frame_queue
  libopencore-amrwb: Make AMR-WB ifdeffery more precise
  libopencore-amr: Conditionally compile decoder and encoder bits
  libopencore-amrnb: cosmetics: Group all encoder-related code together

Conflicts:
configure
libavcodec/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoconfigure: Make warnings from -Wreturn-type fatal errors
Diego Biurrun [Mon, 14 Jan 2013 19:38:33 +0000 (20:38 +0100)]
configure: Make warnings from -Wreturn-type fatal errors

These warnings have no false positives and point to serious bugs.
(cherry picked from commit 99853cb8d4237b810b2fffb4a34f66fd0064ef72)

Conflicts:

configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomovenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd
Michael Niedermayer [Thu, 14 Feb 2013 16:11:34 +0000 (17:11 +0100)]
movenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd

Other software does not store it in this case, and the information
is provided by the codec stream

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

Conflicts:

tests/ref/lavf/mov

6 years agoh264: avoid calling get_format() multiple times
Michael Niedermayer [Sun, 17 Feb 2013 19:41:16 +0000 (20:41 +0100)]
h264: avoid calling get_format() multiple times

Some applications do not like that.
Fixes VDA
Reduces noise for VDPAU

Tested-by: Guillaume POIRIER <poirierg@gmail.com>
Tested-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dece584a639c9fd61a72e21800815e8397b3b617)

Conflicts:

libavcodec/h264.c

6 years agosvq3: unbreak decoding
Matti Hamalainen [Mon, 18 Feb 2013 01:49:45 +0000 (02:49 +0100)]
svq3: unbreak decoding

a7d2861d36756b913e85681b86ed3385274e8ced removed necessary braces.

6 years agobuild: make audio_frame_queue a stand-alone component
Luca Barbato [Sun, 17 Feb 2013 11:38:23 +0000 (12:38 +0100)]
build: make audio_frame_queue a stand-alone component

Encoders requiring it have the dependency expressed in the configure.

6 years agoRevert "swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size"
Carl Eugen Hoyos [Sun, 17 Feb 2013 18:56:09 +0000 (19:56 +0100)]
Revert "swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size"

This reverts commit 620b88a302d522f71a6a95aff500cf7bd8520043.

Fixes ticket #2272.

Conflicts:
libavformat/swfenc.c
(cherry picked from commit 8d0757e1079f588ed69f629e2d1a4d5f232dc298)

6 years agobuild: The libopencore-amrnb encoder depends on audio_frame_queue
Diego Biurrun [Sat, 16 Feb 2013 22:05:05 +0000 (23:05 +0100)]
build: The libopencore-amrnb encoder depends on audio_frame_queue

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit d0fd1dd559b8362bdbca3405f739e0cc202d62e7)

6 years agolibopencore-amrwb: Make AMR-WB ifdeffery more precise
Diego Biurrun [Sat, 16 Feb 2013 22:05:04 +0000 (23:05 +0100)]
libopencore-amrwb: Make AMR-WB ifdeffery more precise

The library might provide an encoder in the future, so it's better to
check for the presence of the decoder rather than just the library.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit ed89cad6aa04bbd692b3eb21c0e0bb56aca77130)

6 years agolibopencore-amr: Conditionally compile decoder and encoder bits
Diego Biurrun [Sat, 16 Feb 2013 22:05:03 +0000 (23:05 +0100)]
libopencore-amr: Conditionally compile decoder and encoder bits

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit f6ad3ca159edcd2e48634bf39b9cd4a85af29cb1)

6 years agolibopencore-amrnb: cosmetics: Group all encoder-related code together
Diego Biurrun [Sat, 16 Feb 2013 22:05:02 +0000 (23:05 +0100)]
libopencore-amrnb: cosmetics: Group all encoder-related code together

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 81ae57a269782fbfc9e11548d1e6605f13d65c9b)

6 years agoWrite the fiel atom to mov files independently of the used video coded.
Carl Eugen Hoyos [Thu, 14 Feb 2013 14:08:37 +0000 (15:08 +0100)]
Write the fiel atom to mov files independently of the used video coded.

The QuickTime specification does not contain any hint that the atom
must not be written in some cases and both the QuickTime and the
AVID decoders do not fail if the atom is present.

This change allows to signal (visually) interlaced streams with
a codec different from uncompressed video.

As a side-effect, this fixes ticket #2202
(cherry picked from commit 7d0e3b197c817b307d599a23704a44763ed0bbdd)

Conflicts:
tests/ref/lavf/mov

6 years agosws: dont write out of array on bigendian
Michael Niedermayer [Thu, 7 Feb 2013 15:11:23 +0000 (16:11 +0100)]
sws: dont write out of array on bigendian

Fixes Ticket2229

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

6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Thu, 14 Feb 2013 12:50:03 +0000 (13:50 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  arm: Fall back to runtime cpu feature detection via /proc/cpuinfo
  doc/platform: Fix 10l typo
  xxan: properly handle odd heights.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoh264: Reset last_pocs in case of reference or frame number inconsistencies
Michael Niedermayer [Wed, 13 Feb 2013 21:36:07 +0000 (22:36 +0100)]
h264: Reset last_pocs in case of reference or frame number inconsistencies

This prevents faulty increasing of has_b_frames
Should fix Ticket 2062

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

6 years agoMerge commit 'b7765d00f911fe0f8fcda21b93a540f27d2ba2f5' into release/1.1
Michael Niedermayer [Thu, 14 Feb 2013 12:14:54 +0000 (13:14 +0100)]
Merge commit 'b7765d00f911fe0f8fcda21b93a540f27d2ba2f5' into release/1.1

* commit 'b7765d00f911fe0f8fcda21b93a540f27d2ba2f5':
  msrledec: check bounds before constructing a possibly invalid pointer,
  qtrle: fix the topmost line for 1bit
  aasc: fix output for msrle compression.

Conflicts:
tests/ref/fate/aasc
tests/ref/fate/qtrle-1bit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '108ca6fad1e0e9af8d6337f908bfd23807b7fbd6' into release/1.1
Michael Niedermayer [Thu, 14 Feb 2013 11:57:14 +0000 (12:57 +0100)]
Merge commit '108ca6fad1e0e9af8d6337f908bfd23807b7fbd6' into release/1.1

* commit '108ca6fad1e0e9af8d6337f908bfd23807b7fbd6':
  yop: check for input overreads.
  yop: check that extradata is large enough.
  fraps: fix off-by one bug for version 1.

Conflicts:
libavcodec/fraps.c
libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '5bee21d724dc47d115faae3f5065a6db74e1594a' into release/1.1
Michael Niedermayer [Thu, 14 Feb 2013 11:22:53 +0000 (12:22 +0100)]
Merge commit '5bee21d724dc47d115faae3f5065a6db74e1594a' into release/1.1

* commit '5bee21d724dc47d115faae3f5065a6db74e1594a':
  vf_delogo: fix copying the input frame.
  vf_delogo: fix an uninitialized read.
  dnxhdenc: fix invalid reads in dnxhd_mb_var_thread().
  atrac3: use correct loop variable in add_tonal_components()

Conflicts:
libavfilter/vf_delogo.c
tests/ref/vsynth/vsynth1-dnxhd-1080i
tests/ref/vsynth/vsynth2-dnxhd-1080i

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomlp: fix channel order.
Michael Niedermayer [Wed, 23 Jan 2013 18:26:22 +0000 (19:26 +0100)]
mlp: fix channel order.

This fixes a regression introduced with todays merge

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '5af78cc98d807f3b43510410dad46e1840c5c99f' into release/1.1
Michael Niedermayer [Thu, 14 Feb 2013 11:03:59 +0000 (12:03 +0100)]
Merge commit '5af78cc98d807f3b43510410dad46e1840c5c99f' into release/1.1

* commit '5af78cc98d807f3b43510410dad46e1840c5c99f':
  mlp: store the channel layout for each substream.
  mlpdec: TrueHD: use Libav channel order.
  mlpdec: set the channel layout.
  x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly

Conflicts:
libavcodec/mlp_parser.c
libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '1fd2deedcc6400e08b31566a547a5fac3b38cefb'
Michael Niedermayer [Wed, 23 Jan 2013 15:12:05 +0000 (16:12 +0100)]
Merge commit '1fd2deedcc6400e08b31566a547a5fac3b38cefb'

* commit '1fd2deedcc6400e08b31566a547a5fac3b38cefb':
  mlpdec: set the channel layout.

Conflicts:
libavcodec/mlpdec.c

(cherry picked from commit 1cf6f6f3daa9d9ae54a4bf0267b510e1638e272b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '3ffcccb4fbaae4d5ad775506f1f2761f2029affa'
Michael Niedermayer [Wed, 23 Jan 2013 14:59:45 +0000 (15:59 +0100)]
Merge commit '3ffcccb4fbaae4d5ad775506f1f2761f2029affa'

* commit '3ffcccb4fbaae4d5ad775506f1f2761f2029affa':
  mlpdec: TrueHD: use Libav channel order.

(cherry picked from commit cd6a8618b1f57a37e6bc639651fe5a657663409b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '99ccd2ba10eac2b282c272ad9e75f082123c765a'
Michael Niedermayer [Wed, 23 Jan 2013 13:54:40 +0000 (14:54 +0100)]
Merge commit '99ccd2ba10eac2b282c272ad9e75f082123c765a'

* commit '99ccd2ba10eac2b282c272ad9e75f082123c765a':
  mlp: store the channel layout for each substream.

Conflicts:
libavcodec/mlp_parser.c
libavcodec/mlpdec.c

(cherry picked from commit fa36270c4c68589882cfeae68a037f1d191231c2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomlpdec: dont leave a invalid huff_lsb in the context.
Michael Niedermayer [Thu, 17 Jan 2013 23:22:39 +0000 (00:22 +0100)]
mlpdec: dont leave a invalid huff_lsb in the context.

Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4aed4f58465fa0d6940ce72c0dad90caab3ed36e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoarm: Fall back to runtime cpu feature detection via /proc/cpuinfo
Martin Storsjö [Thu, 7 Feb 2013 08:54:20 +0000 (10:54 +0200)]
arm: Fall back to runtime cpu feature detection via /proc/cpuinfo

On recent android versions, /proc/self/auxw is unreadable
(unless the process is running running under the shell uid or
in debuggable mode, which makes it hard to notice). See
http://b.android.com/43055 and
https://android-review.googlesource.com/51271 for more information
about the issue.

This makes sure e.g. neon optimizations are enabled at runtime in
android apps even when built in release mode, if configured to
use the runtime detection.

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

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agodoc/platform: Fix 10l typo
Derek Buitenhuis [Wed, 13 Feb 2013 23:41:37 +0000 (18:41 -0500)]
doc/platform: Fix 10l typo

This error was somehow missed for months.

(cherry picked from commit 130cefc9dcedea5babc349251fbeec6f037144ac)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agomsrledec: check bounds before constructing a possibly invalid pointer,
Anton Khirnov [Tue, 29 Jan 2013 11:24:09 +0000 (12:24 +0100)]
msrledec: check bounds before constructing a possibly invalid pointer,

CC:libav-stable@libav.org
(cherry picked from commit 9bd6375d5f16842306dcecde637ffe605acda26b)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoxxan: properly handle odd heights.
Kostya Shishkov [Tue, 29 Jan 2013 18:53:04 +0000 (19:53 +0100)]
xxan: properly handle odd heights.

Duplicate the last one or two chroma lines.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
CC:libav-stable@libav.org
(cherry picked from commit 685e6f2e3939f124b41c7801cc541dad8252af3d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoqtrle: fix the topmost line for 1bit
Kostya Shishkov [Wed, 30 Jan 2013 05:42:17 +0000 (06:42 +0100)]
qtrle: fix the topmost line for 1bit

Signed-off-by: Anton Khirnov <anton@khirnov.net>
CC:libav-stable@libav.org
(cherry picked from commit 89f11f498b9c15bc71494a11a7ec560f4adf630d)

Conflicts:

cmdutils.c

6 years agoyop: check for input overreads.
Anton Khirnov [Wed, 30 Jan 2013 06:15:04 +0000 (07:15 +0100)]
yop: check for input overreads.

CC:libav-stable@libav.org
(cherry picked from commit 8136f234445862c94d1c081606b2d1e3d44fccf3)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agovf_delogo: fix copying the input frame.
Anton Khirnov [Mon, 21 Jan 2013 20:48:49 +0000 (21:48 +0100)]
vf_delogo: fix copying the input frame.

CC:libav-stable@libav.org
(cherry picked from commit 7194330bcd6db8dc5c22e0c162a0992d519307f9)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoaasc: fix output for msrle compression.
Anton Khirnov [Tue, 29 Jan 2013 11:42:54 +0000 (12:42 +0100)]
aasc: fix output for msrle compression.

The bottom line was invalid before.

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

Conflicts:

cmdutils.c

6 years agoyop: check that extradata is large enough.
Anton Khirnov [Wed, 30 Jan 2013 06:00:50 +0000 (07:00 +0100)]
yop: check that extradata is large enough.

CC:libav-stable@libav.org
(cherry picked from commit 06cf597c352519d2b70f293518c61b8c312f5d4f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agovf_delogo: fix an uninitialized read.
Anton Khirnov [Mon, 21 Jan 2013 20:10:54 +0000 (21:10 +0100)]
vf_delogo: fix an uninitialized read.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agofraps: fix off-by one bug for version 1.
Anton Khirnov [Tue, 29 Jan 2013 16:19:08 +0000 (17:19 +0100)]
fraps: fix off-by one bug for version 1.

CC:libav-stable@libav.org
(cherry picked from commit 2cd4068071b9a8908823a3107f97e938211045ce)

Conflicts:

cmdutils.c
libavcodec/fraps.c

6 years agodnxhdenc: fix invalid reads in dnxhd_mb_var_thread().
Anton Khirnov [Tue, 22 Jan 2013 10:55:54 +0000 (11:55 +0100)]
dnxhdenc: fix invalid reads in dnxhd_mb_var_thread().

Do not assume that frame dimensions are mod16 (or that height is mod32
for interlaced).

CC:libav-stable@libav.org
(cherry picked from commit 69c25c9284645cf5189af2ede42d6f53828f3b45)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoatrac3: use correct loop variable in add_tonal_components()
Michael Karcher [Fri, 25 Jan 2013 20:03:53 +0000 (15:03 -0500)]
atrac3: use correct loop variable in add_tonal_components()

Signed-off-by: Michael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
(cherry picked from commit 0e3afacd4d8fbe1c21e0bc16bd707809cd87380f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agomlp: store the channel layout for each substream.
Tim Walker [Mon, 31 Dec 2012 14:33:23 +0000 (15:33 +0100)]
mlp: store the channel layout for each substream.

Also stop storing the channel arrangement in the header info, as it's unused outside of ff_mlp_read_major_sync.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
(cherry picked from commit 99ccd2ba10eac2b282c272ad9e75f082123c765a)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agomlpdec: TrueHD: use Libav channel order.
Tim Walker [Mon, 31 Dec 2012 14:33:24 +0000 (15:33 +0100)]
mlpdec: TrueHD: use Libav channel order.

Fixes bug 208.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
(cherry picked from commit 3ffcccb4fbaae4d5ad775506f1f2761f2029affa)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agomlpdec: set the channel layout.
Tim Walker [Mon, 31 Dec 2012 14:33:25 +0000 (15:33 +0100)]
mlpdec: set the channel layout.

Fixes bug 401.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
(cherry picked from commit 1fd2deedcc6400e08b31566a547a5fac3b38cefb)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agox86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly
Diego Biurrun [Mon, 21 Jan 2013 18:43:06 +0000 (19:43 +0100)]
x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly

CC: libav-stable@libav.org
(cherry picked from commit 4f56e773fe8a554b8c2662650aaf799c2ece2721)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agolavf/mov: skip version and flags attributes in mov_read_chan function
Matthieu Bouron [Mon, 4 Feb 2013 21:06:11 +0000 (22:06 +0100)]
lavf/mov: skip version and flags attributes in mov_read_chan function

Fixes ticket #1764.

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

6 years agoffmpeg: do not call exit from exit_program() n1.1.2
Michael Niedermayer [Wed, 6 Feb 2013 03:03:52 +0000 (04:03 +0100)]
ffmpeg: do not call exit from exit_program()

This should fix  Ticket2116

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoffmpeg: dont allow -flags to override -pass
Michael Niedermayer [Wed, 6 Feb 2013 00:25:52 +0000 (01:25 +0100)]
ffmpeg: dont allow -flags to override -pass

Fixes Ticket2154

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoupdate for 1.1.2
Michael Niedermayer [Tue, 5 Feb 2013 16:05:02 +0000 (17:05 +0100)]
update for 1.1.2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoljpegenc: allocate needed scratch-buffer
Michael Niedermayer [Tue, 5 Feb 2013 17:52:07 +0000 (18:52 +0100)]
ljpegenc: allocate needed scratch-buffer

Fixes null pointer dereference
Fixes Ticket2207

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

6 years agoriff: fix infinite loop
Michael Niedermayer [Tue, 5 Feb 2013 17:31:27 +0000 (18:31 +0100)]
riff: fix infinite loop

Fixes Ticket2241

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

6 years agodvenc: dont fail hard if the timecode is invalid
Michael Niedermayer [Tue, 5 Feb 2013 21:57:35 +0000 (22:57 +0100)]
dvenc: dont fail hard if the timecode is invalid

Instead just dont store the timecode
Fixes Ticket2187

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

6 years agomovtextenc: fix pointer messup and out of array accesses
Michael Niedermayer [Tue, 5 Feb 2013 20:54:02 +0000 (21:54 +0100)]
movtextenc: fix pointer messup and out of array accesses

Fixes Ticket2213

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

6 years agoh264: skip error concealment when SPS and slices are mismatching
Michael Niedermayer [Sat, 2 Feb 2013 20:11:54 +0000 (21:11 +0100)]
h264: skip error concealment when SPS and slices are mismatching

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 695af8eed642ff0104834495652d1ee784a4c14d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoh264: Only apply error concealment if theres a frame
Michael Niedermayer [Sun, 20 Jan 2013 14:03:13 +0000 (15:03 +0100)]
h264: Only apply error concealment if theres a frame

Without any correctly decoded slices, there can be no frame.

Fixes out of array reads

Found-by: Rafaël Carré
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 60af6c3138dc501a647bc69b374d5d33d5d86ab5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoh264: check the pixel format directly and force a reinit on mismatches.
Michael Niedermayer [Tue, 29 Jan 2013 03:17:48 +0000 (04:17 +0100)]
h264: check the pixel format directly and force a reinit on mismatches.

The existing checks are insufficient to detect a pixel format
changes in case of some damaged streams.
Fixes inconsistency and later out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 11c99c78bafa77f679a1a3ba06ad00984b9a4cae)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoaacdec: check channel count
Michael Niedermayer [Sun, 27 Jan 2013 19:37:27 +0000 (20:37 +0100)]
aacdec: check channel count

Prevent out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agovqavideo: check chunk sizes before reading chunks
Michael Niedermayer [Fri, 25 Jan 2013 05:11:59 +0000 (06:11 +0100)]
vqavideo: check chunk sizes before reading chunks

Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agogifdec: gif_copy_img_rect: Fix end pointer
Michael Niedermayer [Thu, 24 Jan 2013 22:11:10 +0000 (23:11 +0100)]
gifdec: gif_copy_img_rect: Fix end pointer

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c10350358da58600884292c08a8690289b81de29)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agosanm: Check decoded_size.
Michael Niedermayer [Wed, 23 Jan 2013 23:27:10 +0000 (00:27 +0100)]
sanm: Check decoded_size.

This prevents a buffer overflow in rle_decode()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7357ca900efcf829de4cce4cec6ddc286526d417)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoUse proper "" quotes for local header #includes
Diego Biurrun [Fri, 1 Feb 2013 09:27:45 +0000 (10:27 +0100)]
Use proper "" quotes for local header #includes
(cherry picked from commit 6c1a7d07eb41b4cf36e48ebb560fecd9504fd968)

Conflicts:

libavcodec/kbdwin.c

6 years agohuffyuvdec: Skip len==0 cases
Michael Niedermayer [Tue, 29 Jan 2013 18:10:07 +0000 (19:10 +0100)]
huffyuvdec: Skip len==0 cases

Fixes vlc decoding for hypothetical files that would contain such cases.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agohuffyuvdec: Check init_vlc() return codes.
Michael Niedermayer [Tue, 29 Jan 2013 16:56:19 +0000 (17:56 +0100)]
huffyuvdec: Check init_vlc() return codes.

Prevents out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f67a0d115254461649470452058fa3c28c0df294)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoaasc: fix 16bpp on big-endian
Piotr Bandurski [Mon, 28 Jan 2013 02:42:07 +0000 (03:42 +0100)]
aasc: fix 16bpp on big-endian

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Tue, 5 Feb 2013 15:28:36 +0000 (16:28 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  arm: vp8: Fix the plain-armv6 version of vp8_luma_dc_wht
  Prepare for 9.2 Release
  lavr: call mix_function_init() in ff_audio_mix_set_matrix()
  rtpenc_chain: Use the original AVFormatContext for getting payload type
  rtp: Make sure the output format pointer is set

Conflicts:
RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '62de693a17f9b107be7867d822d5accacd4be544' into release/1.1
Michael Niedermayer [Tue, 5 Feb 2013 15:19:17 +0000 (16:19 +0100)]
Merge commit '62de693a17f9b107be7867d822d5accacd4be544' into release/1.1

* commit '62de693a17f9b107be7867d822d5accacd4be544':
  rtp: Make sure priv_data is set before reading it
  videodsp_armv5te: remove #if HAVE_ARMV5TE_EXTERNAL
  get_bits: change the failure condition in init_get_bits
  mpegvideo: fix loop condition in draw_line()

Conflicts:
libavcodec/get_bits.h
libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoDo not change codec in flv streams if the user has forced a codec.
Carl Eugen Hoyos [Fri, 1 Feb 2013 22:27:15 +0000 (23:27 +0100)]
Do not change codec in flv streams if the user has forced a codec.

Fixes ticket #2218.
(cherry picked from commit 6a50e8a190bc1329fd3e76e8497bb7f870b6e69b)

6 years agoffmpeg: fix broken channel_layout option
Matthieu Bouron [Fri, 1 Feb 2013 17:58:14 +0000 (18:58 +0100)]
ffmpeg: fix broken channel_layout option

Fixes ticket #2163.

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

6 years agodoc/muxers.texi: Fix mp3 picture attachment documentation.
Carl Eugen Hoyos [Fri, 1 Feb 2013 16:54:48 +0000 (17:54 +0100)]
doc/muxers.texi: Fix mp3 picture attachment documentation.
(cherry picked from commit 99eedfc40086972987aa27df8b1259c8bf15b20c)

6 years agowtvdec: demux thumbnail picture to AVStream.attached_pic
Peter Ross [Sun, 6 Jan 2013 03:15:24 +0000 (14:15 +1100)]
wtvdec: demux thumbnail picture to AVStream.attached_pic

Fixes ticket #2133.

(cherry picked from commit 508836932fcbc3c109fcc4df7a2f2b0bf21bbece)

6 years agoarm: vp8: Fix the plain-armv6 version of vp8_luma_dc_wht
Martin Storsjö [Fri, 25 Jan 2013 21:16:23 +0000 (23:16 +0200)]
arm: vp8: Fix the plain-armv6 version of vp8_luma_dc_wht

This makes the plain-armv6 version use the same registers as the
armv6t2 version above.

This fixes fate-vp8 on plain-armv6 devices.

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

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agomovenc: check that fps for tmcd is within encodable range.
Michael Niedermayer [Thu, 17 Jan 2013 17:52:35 +0000 (18:52 +0100)]
movenc: check that fps for tmcd is within encodable range.

The fps is stored as a 8 bit value thus 255 is the maximum encodable.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomovenc: Calculate fps for tmcd without intermediate step.
Michael Niedermayer [Thu, 17 Jan 2013 17:51:49 +0000 (18:51 +0100)]
movenc: Calculate fps for tmcd without intermediate step.

Fixes part of Ticket2045

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoffmpeg: copy tmcd track timebase parameters
Michael Niedermayer [Thu, 17 Jan 2013 17:49:46 +0000 (18:49 +0100)]
ffmpeg: copy tmcd track timebase parameters

Fixes part of Ticket2045

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agosanm: check image dimensions before using them
Michael Niedermayer [Tue, 22 Jan 2013 20:30:20 +0000 (21:30 +0100)]
sanm: check image dimensions before using them

Avoids integer overflows and out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 49b729d3af8464de431362e6c5b3027102bc2f88)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agortmp: fix buffer overflows in ff_amf_tag_contents()
Xi Wang [Wed, 23 Jan 2013 02:40:05 +0000 (21:40 -0500)]
rtmp: fix buffer overflows in ff_amf_tag_contents()

A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e692374f7962ea358c329de38c380103f8991b6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agortmp: fix multiple broken overflow checks
Xi Wang [Tue, 22 Jan 2013 22:49:29 +0000 (17:49 -0500)]
rtmp: fix multiple broken overflow checks

Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 902cfe2f74d777a7dc20ac68f2393b9f84b790c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agortpenc: fix overflow checking in avc_mp4_find_startcode()
Xi Wang [Wed, 23 Jan 2013 01:58:07 +0000 (20:58 -0500)]
rtpenc: fix overflow checking in avc_mp4_find_startcode()

The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2f014567cfd63e58156f60666f1a61ba147276ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agompeg1enc: Disable threads for resolutions too large for multi-threading
Michael Niedermayer [Sun, 20 Jan 2013 03:14:09 +0000 (04:14 +0100)]
mpeg1enc: Disable threads for resolutions too large for multi-threading

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavf/srtdec: do not try to queue empty subtitle chunks.
Clément Bœsch [Sun, 27 Jan 2013 11:25:21 +0000 (20:25 +0900)]
lavf/srtdec: do not try to queue empty subtitle chunks.

Regression since 3af3a30.
Fixes Ticket2167.
(cherry picked from commit f2b6aabd3da7d0d15c7cea0a9fb649b530e2d3cb)

6 years agolavc/iff: ilbm: unbreak decoding on big endian
Paul B Mahol [Sat, 26 Jan 2013 11:58:36 +0000 (11:58 +0000)]
lavc/iff: ilbm: unbreak decoding on big endian

Fixes ticket #2192.

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

6 years agoFix atrac3 decoder broken in e55d53905f34f8e8747f6d321e9a695dc02ebb2f
Michael Karcher [Fri, 25 Jan 2013 19:44:50 +0000 (20:44 +0100)]
Fix atrac3 decoder broken in e55d53905f34f8e8747f6d321e9a695dc02ebb2f

Signed-off-by: Michael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dcbb920f1587d1fce777aae947a49304665436b5)

6 years agoPrepare for 9.2 Release
Reinhard Tartler [Thu, 24 Jan 2013 11:02:57 +0000 (12:02 +0100)]
Prepare for 9.2 Release