ffmpeg.git
5 years agocmdutils: update year to 2013 n0.9.3
Michael Niedermayer [Sun, 22 Sep 2013 22:08:48 +0000 (00:08 +0200)]
cmdutils: update year to 2013

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoupdate for 0.9.3
Michael Niedermayer [Sun, 22 Sep 2013 20:35:52 +0000 (22:35 +0200)]
update for 0.9.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ffv1enc: update buffer check for 16bps
Michael Niedermayer [Mon, 9 Sep 2013 15:58:18 +0000 (17:58 +0200)]
avcodec/ffv1enc: update buffer check for 16bps

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

Conflicts:

libavcodec/ffv1enc.c
(cherry picked from commit c900c6e5c26cd86cf34f9c8d4347cedbd01f3935)

5 years agoavcodec/dsputil: fix signedness in sizeof() comparissions
Michael Niedermayer [Fri, 30 Aug 2013 21:40:47 +0000 (23:40 +0200)]
avcodec/dsputil: fix signedness in sizeof() comparissions

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/pngdsp: fix (un)signed type in end comparission
Michael Niedermayer [Fri, 30 Aug 2013 21:14:32 +0000 (23:14 +0200)]
avcodec/pngdsp: fix (un)signed type in end comparission

Fixes out of array accesses
Fixes Ticket2919

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

Conflicts:

libavcodec/pngdsp.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agomatroska_read_seek: Fix used streams for subtitle index compensation
Michael Niedermayer [Mon, 20 May 2013 02:00:30 +0000 (04:00 +0200)]
matroska_read_seek: Fix used streams for subtitle index compensation

Might fix Ticket1907 (I have no testcase so i cant test)

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agojpeg2000: check log2_cblk dimensions
Michael Niedermayer [Sat, 24 Aug 2013 01:19:40 +0000 (03:19 +0200)]
jpeg2000: check log2_cblk dimensions

Fixes out of array access
Fixes Ticket2895

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9a271a9368eaabf99e6c2046103acb33957e63b7)

Conflicts:

libavcodec/jpeg2000dec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Conflicts:

libavcodec/j2kdec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/rpza: Perform pointer advance and checks before using the pointers
Michael Niedermayer [Wed, 21 Aug 2013 23:07:32 +0000 (01:07 +0200)]
avcodec/rpza: Perform pointer advance and checks before using the pointers

Fixes out of array accesses
Fixes Ticket2850

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

Conflicts:

libavcodec/rpza.c

5 years agoavcodec/flashsv: check diff_start/height
Michael Niedermayer [Tue, 20 Aug 2013 21:18:48 +0000 (23:18 +0200)]
avcodec/flashsv: check diff_start/height

Fixes out of array accesses
Fixes Ticket2844

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoupdate all trac links to use the trac subdomain
Michael Niedermayer [Sat, 29 Jun 2013 17:48:17 +0000 (19:48 +0200)]
update all trac links to use the trac subdomain

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agormdec: flush audio packet on seeking
Michael Niedermayer [Sun, 17 Mar 2013 23:00:02 +0000 (00:00 +0100)]
rmdec: flush audio packet on seeking

Fixes Ticket1605

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodoc/APIchanges: List merge commit hashes and version numbers
Michael Niedermayer [Wed, 13 Feb 2013 02:32:23 +0000 (03:32 +0100)]
doc/APIchanges: List merge commit hashes and version numbers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoapichanges: fix 2 wrong hashes
Michael Niedermayer [Thu, 14 Feb 2013 20:13:32 +0000 (21:13 +0100)]
apichanges: fix 2 wrong hashes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 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>
5 years agohuffyuvdec: Skip len==0 cases
Michael Niedermayer [Tue, 29 Jan 2013 18:22:33 +0000 (19:22 +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>
(cherry picked from commit 5ff41ffeb4cb9ea6df49757dc859619dc3d3ab4f)

Conflicts:

libavcodec/huffyuv.c
(cherry picked from commit 9bc70fe1ae50fd2faa0b9429d47cfbda01a92ebc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agohuffyuvdec: Check init_vlc() return codes.
Michael Niedermayer [Tue, 29 Jan 2013 17:29:41 +0000 (18:29 +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>
(cherry picked from commit 95ab8d33e1a680f30a5a9605175112008ab81afc)

Conflicts:

libavcodec/huffyuv.c
(cherry picked from commit 277def59fce10d91e3113e5c0f63e22bc4abfa88)

Conflicts:

libavcodec/huffyuv.c

5 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>
5 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>
5 years agoavformat/avidec: match first index and first packet size=0 handling
Michael Niedermayer [Sat, 31 Aug 2013 01:08:25 +0000 (03:08 +0200)]
avformat/avidec: match first index and first packet size=0 handling

Fixes Ticket2861

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

Conflicts:
libavformat/avidec.c

6 years agompeg12dec: avoid reinitialization on PS changes when possible.
Michael Niedermayer [Mon, 8 Jul 2013 19:46:20 +0000 (21:46 +0200)]
mpeg12dec: avoid reinitialization on PS changes when possible.

Fixes Ticket2574

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

Conflicts:
libavcodec/mpeg12dec.c

6 years agompegts: only reopen pmt_cb filter if its different from the previous.
Michael Niedermayer [Fri, 5 Jul 2013 01:27:07 +0000 (03:27 +0200)]
mpegts: only reopen pmt_cb filter if its different from the previous.

Fixes Ticket2632

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

6 years agormdec: Pass AVIOContext to rm_read_metadata()
Michael Niedermayer [Mon, 1 Jul 2013 21:38:08 +0000 (23:38 +0200)]
rmdec: Pass AVIOContext to rm_read_metadata()

Fix null pointer dereference
Fixes Ticket2588

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

Conflicts:
libavformat/rmdec.c

6 years agoavformat/libmodplug: Reduce the probe score for small input
Michael Niedermayer [Thu, 20 Jun 2013 23:11:45 +0000 (01:11 +0200)]
avformat/libmodplug: Reduce the probe score for small input

This ensures that theres enough data for mpeg_probe() to recognize mpeg-ps
Fixes Ticket2583

Based on code by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c605adbf562fbf535e83ae427bb681bc45e440c8)

6 years agoAutodetect idcin only if audio properties allow decoding.
Carl Eugen Hoyos [Wed, 19 Jun 2013 14:31:10 +0000 (16:31 +0200)]
Autodetect idcin only if audio properties allow decoding.

Fixes ticket #2688.
(cherry picked from commit 06bede95fcea47d2e51e8ff248c15311f335b898)

6 years agoalacenc: Fix missing sign_extend()
Michael Niedermayer [Wed, 12 Jun 2013 22:01:13 +0000 (00:01 +0200)]
alacenc: Fix missing sign_extend()

Fixes ticket #2497

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

6 years agoh264_cavlc: fix reading skip run
Michael Niedermayer [Thu, 30 May 2013 16:30:42 +0000 (18:30 +0200)]
h264_cavlc: fix reading skip run

Fixes Ticket2606

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

Conflicts:
libavcodec/h264_cavlc.c

6 years agosmacker: remove av_clip_int16()
Michael Niedermayer [Mon, 20 May 2013 19:42:06 +0000 (21:42 +0200)]
smacker: remove av_clip_int16()

Fixes Ticket2425

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

6 years agoavidec: dont randomly skip packets for offseting the index
Michael Niedermayer [Fri, 17 May 2013 20:03:14 +0000 (22:03 +0200)]
avidec: dont randomly skip packets for offseting the index

Fixes Ticket2490

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

6 years agoFix type of shared flac table ff_flac_blocksize_table[].
Carl Eugen Hoyos [Sun, 5 May 2013 17:29:00 +0000 (19:29 +0200)]
Fix type of shared flac table ff_flac_blocksize_table[].

Fixes ticket #2533.
(cherry picked from commit a07ac1f7888fd08e42da2bed0421e74f1cfac177)

6 years agoWrite broken aac frames to mov files instead of skipping them.
Carl Eugen Hoyos [Sat, 30 Mar 2013 07:41:46 +0000 (08:41 +0100)]
Write broken aac frames to mov files instead of skipping them.

Fixes decoding with picky media players.

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

Conflicts:
libavformat/movenc.c

6 years agoOnly test the first frame for missing aac_adtstoasc bistream filter.
Carl Eugen Hoyos [Tue, 26 Mar 2013 14:16:07 +0000 (15:16 +0100)]
Only test the first frame for missing aac_adtstoasc bistream filter.

Many players ignore broken aac frames, so don't abort mov or flv
muxing when encountering one, just print a warning instead.

Fixes ticket #2380.
(cherry picked from commit 1741fece7073f51efdd837a4f307ea2cdf3d1cfb)

Conflicts:
libavformat/flvenc.c
libavformat/movenc.c

6 years agoDo not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.
Carl Eugen Hoyos [Sat, 16 Mar 2013 19:13:44 +0000 (20:13 +0100)]
Do not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.

Reconfiguring can break x264 lossless encoding.

Fixes ticket #2165.
(cherry picked from commit 75c7e4583f4fd727d236a12763a265502fe00988)

6 years agoRequire at least three frames to autodetect loas.
Carl Eugen Hoyos [Sat, 2 Feb 2013 21:36:25 +0000 (22:36 +0100)]
Require at least three frames to autodetect loas.
(cherry picked from commit a60530e3ee1d9532c026a52b03661f88e163d647)

6 years agolavf/avio: check for : in filenames for protocols.
Nicolas George [Wed, 27 Feb 2013 18:19:15 +0000 (19:19 +0100)]
lavf/avio: check for : in filenames for protocols.

If the first "special" character in a filename is a comma,
it can introduce protocol options, but only if there is a
colon at the end. Otherwise, it is just a filename with a
comma.

Fix trac ticket #2303.
(cherry picked from commit d9fad53f4b447db1e436dcf3fc4a57e604616e6c)

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)

Conflicts:
ffmpeg_opt.c

6 years agomatroskaenc: add codec_tag lists back.
Carl Eugen Hoyos [Thu, 24 Jan 2013 01:30:40 +0000 (02:30 +0100)]
matroskaenc: add codec_tag lists back.

This reverts 312645e :
"Do not set codec_tag property for matroska muxers."

Also adds dummy codec_tag lists with codecs
supported in mkv but not in wav / avi.

Fixes ticket #2169.
(cherry picked from commit df39c3ce385c02cbd8046298578ea7454c0a0f81)

Conflicts:
libavformat/matroskaenc.c

6 years agotiffdec: Use the correct height field.
Piotr Bandurski [Sun, 6 Jan 2013 00:56:23 +0000 (01:56 +0100)]
tiffdec: Use the correct height field.

Fixes Ticket913

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

Conflicts:
libavcodec/tiff.c

6 years agolavc/ass_split: check for NULL pointer in ff_ass_split_override_codes().
Clément Bœsch [Sun, 30 Dec 2012 05:53:48 +0000 (06:53 +0100)]
lavc/ass_split: check for NULL pointer in ff_ass_split_override_codes().

This is consistent with the other ff_ass_split_* functions.

It also fixes a crash when trying to split a dialog with text=NULL
(which seems to happen when the text of the dialog is empty); basically,
this commit fixes crashes when trying to encode an empty text subtitle
dialog (see subrip and mov_text encoders).

Fixes Ticket2048.
(cherry picked from commit c83002a4f8042ccfa0688a9a18e8fa0369c1fda8)

6 years agoavidec: try to support oddly muxed MMES stream
Michael Niedermayer [Thu, 22 Nov 2012 22:08:01 +0000 (23:08 +0100)]
avidec: try to support oddly muxed MMES stream

Fixes ticket1804

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

6 years agoriff: ignore ff_read_riff_info() failure.
Michael Niedermayer [Fri, 23 Nov 2012 22:35:16 +0000 (23:35 +0100)]
riff: ignore ff_read_riff_info() failure.

Some files simply contain invalid info tags.
Fixes unrelated bug posted into Ticket1821

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

6 years agoriff: retry reading metadata without padding if it fails with
Michael Niedermayer [Thu, 18 Oct 2012 02:58:20 +0000 (04:58 +0200)]
riff: retry reading metadata without padding if it fails with

Fixes Ticket1821

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d0c27e88d2bb495d61bd32f41769f767a0c2a802)

6 years agobuild: Fix some paths in uninstall-libs
jamal [Fri, 3 Aug 2012 20:13:27 +0000 (17:13 -0300)]
build: Fix some paths in uninstall-libs

Folder and file names weren't being separated with a slash.
This resulted in .dll.a, .lib and .def files not being removed on uninstall.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoFix muxing mjpeg in swf.
Carl Eugen Hoyos [Wed, 12 Sep 2012 11:08:27 +0000 (13:08 +0200)]
Fix muxing mjpeg in swf.
(cherry picked from commit 7680d99b4302e476076cc1b8f2567f47c2aaef4d)

6 years agodxva2: include dxva.h if found
Ronald S. Bultje [Sun, 24 Jun 2012 10:17:13 +0000 (11:17 +0100)]
dxva2: include dxva.h if found

Apparently, some build environments require dxva.h even for dxva2,
while others lack this header entirely.  Including it conditionally
allows building in both cases.

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

Conflicts:

configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoClarify that -passlogfile has a different syntax when used with -vcodec libx264.
Carl Eugen Hoyos [Fri, 31 Aug 2012 12:17:18 +0000 (14:17 +0200)]
Clarify that -passlogfile has a different syntax when used with -vcodec libx264.

7 years agoindeo4: check that num_mbs matches n0.9.2
Michael Niedermayer [Sat, 31 Mar 2012 19:42:50 +0000 (21:42 +0200)]
indeo4: check that num_mbs matches

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodsp: fix diff_bytes_mmx() with small width
Michael Niedermayer [Sat, 17 Mar 2012 19:45:45 +0000 (20:45 +0100)]
dsp: fix diff_bytes_mmx() with small width

Fixes Ticket1068

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoupdate for 0.9.2
Michael Niedermayer [Wed, 2 May 2012 23:27:16 +0000 (01:27 +0200)]
update for 0.9.2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoelectronicarts: check bytes per sample for validity
Janne Grunau [Thu, 5 Jan 2012 21:12:35 +0000 (22:12 +0100)]
electronicarts: check bytes per sample for validity

Prevents division by zero.

7 years agovqavideodev: Check image dimensions
Michael Niedermayer [Thu, 22 Mar 2012 22:43:37 +0000 (23:43 +0100)]
vqavideodev: Check image dimensions

Fixes out of heap array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3583c8706df0abbfa3ecdd6730f4f3d72a01fe6d)
Independently-Found-by: Fabian Yamaguchi
Fixes: CVE-2012-0947

Conflicts:

libavcodec/vqavideo.c

7 years agosonic: update to new API
Michael Niedermayer [Fri, 16 Mar 2012 14:10:33 +0000 (15:10 +0100)]
sonic: update to new API

Fixes Ticket1075

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

Conflicts:

libavcodec/sonic.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoqpeg: Fix out of array writes.
Michael Niedermayer [Sat, 3 Mar 2012 02:37:52 +0000 (03:37 +0100)]
qpeg: Fix out of array writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosrtdec: fix a format string vulnerability.
Fabian Greffrath [Sat, 3 Mar 2012 01:35:27 +0000 (02:35 +0100)]
srtdec: fix a format string vulnerability.

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

7 years agoReplace SSE2 instruction in scalarproduct_float_sse() by SSE equivalent.
ami_stuff [Thu, 22 Mar 2012 18:28:52 +0000 (19:28 +0100)]
Replace SSE2 instruction in scalarproduct_float_sse() by SSE equivalent.

Fixes an AAC decoding issue with the sample from ticket #213 on machines
with SSE but without SSE2.
Based on 89411a by Reimar.

(cherry picked from commit f6b78638086beae9bcab672d4c9de1790be5a928)

7 years agolavfi/fade: fix black level for non studio-level pixel formats
Stefano Sabatini [Wed, 28 Mar 2012 22:17:23 +0000 (00:17 +0200)]
lavfi/fade: fix black level for non studio-level pixel formats

Fix trac ticket #1139, regression introduced in 8c1fb50d077d5f954.
(cherry picked from commit 95ce0ddcfe99182365e0e57f5f41d7f1a01c57eb)

7 years agoh264: fix seeking in low delay streams without IDR
Michael Niedermayer [Wed, 4 Apr 2012 01:43:23 +0000 (03:43 +0200)]
h264: fix seeking in low delay streams without IDR

Fixes Ticket1165

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

7 years agosmacker audio: sign-extend the initial 16-bit predicted value
Franz Brauße [Fri, 30 Mar 2012 18:40:14 +0000 (14:40 -0400)]
smacker audio: sign-extend the initial 16-bit predicted value

Fixes Bug #265

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 12cbbbb4abda2de0ea123282ccf7ebee61517f7d)

7 years agomxfdec: Only parse next partition pack if parsing forward
Tomas Härdin [Tue, 20 Mar 2012 10:03:48 +0000 (11:03 +0100)]
mxfdec: Only parse next partition pack if parsing forward

This fixes ticket #1099.

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

7 years agoindeo4: fix LE reader define for backport
Michael Niedermayer [Mon, 16 Jan 2012 21:26:52 +0000 (22:26 +0100)]
indeo4: fix LE reader define for backport

Fixes Ticket920

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix compilation with yasm-0.6.2.
Carl Eugen Hoyos [Thu, 12 Jan 2012 15:53:42 +0000 (16:53 +0100)]
Fix compilation with yasm-0.6.2.

7 years agoUpdate for 0.9.1 n0.9.1
Michael Niedermayer [Thu, 5 Jan 2012 02:00:56 +0000 (03:00 +0100)]
Update for 0.9.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovc1dec: fix invalid memory access for small video dimensions
John Brooks [Sun, 11 Dec 2011 09:37:21 +0000 (02:37 -0700)]
vc1dec: fix invalid memory access for small video dimensions

For small video dimensions, these calculations of the upper bound
for pixel access may have a negative result. Using an unsigned
comparison to bound a potentially negative value only works if
the greater operand is non-negative. Fixed by doing edge emulation
when the upper bound is probably negative, everywhere that this
pattern appears.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
(cherry picked from commit d209c27b09234cc40bbdbd680aa502b493edf595)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorv34: fix invalid memory access for small video dimensions
John Brooks [Wed, 4 Jan 2012 06:27:35 +0000 (23:27 -0700)]
rv34: fix invalid memory access for small video dimensions

For small video dimensions calculations of the upper bound for pixel
access may result in negative value. Using an unsigned comparison
works only if the greater operand is non-negative. This is fixed by
doing edge emulation explicitly for such conditions.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
(cherry picked from commit aacf6b3a2fd8bc8603e3deaa6e612ea03cf08707)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRevert "rmdec: Avoid allocating huge packets"
Michael Niedermayer [Wed, 4 Jan 2012 23:51:12 +0000 (00:51 +0100)]
Revert "rmdec: Avoid allocating huge packets"

This reverts commit 66f71f3b5e2e7b6e5049bd9831c371e16aff8a53.

This causes regressions with RDT.
(cherry picked from commit c4eec85a1fa768025f88261995af08f1dba9685d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: use avg_frame_rate and packet number to exit find_stream_info
Michael Niedermayer [Wed, 4 Jan 2012 23:49:02 +0000 (00:49 +0100)]
lavf: use avg_frame_rate and packet number to exit find_stream_info

qatar does this too but clobbers the AVPacket.duration by approximate
values.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: revert commit bb99ae3ae924c942a634bec7711ec7ee11c38eb9
Michael Niedermayer [Wed, 4 Jan 2012 23:22:19 +0000 (00:22 +0100)]
lavf: revert commit bb99ae3ae924c942a634bec7711ec7ee11c38eb9

Author: Michael Niedermayer <michaelni@gmx.at>
Date:   Thu Nov 3 22:38:10 2011 +0100

    lavf: fix null pointer dereference in rdt

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This is no longer needed and causes various problems with RTSP

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: make sure ch is non zero before calling vorbis_residue_decode
Michael Niedermayer [Wed, 4 Jan 2012 20:55:52 +0000 (21:55 +0100)]
vorbis: make sure ch is non zero before calling vorbis_residue_decode

This possibly makes part of the CVE-2011-3895 fix unneeded.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: An additional defense in the Vorbis codec.
Chris Evans [Wed, 4 Jan 2012 20:53:35 +0000 (21:53 +0100)]
vorbis: An additional defense in the Vorbis codec.

BUG=101458
Review URL: http://codereview.chromium.org/8414025

Fixes second part of CVE-2011-3895

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: Fix decoder bug.
Chris Evans [Wed, 4 Jan 2012 20:51:18 +0000 (21:51 +0100)]
vorbis: Fix decoder bug.

BUG=101458
Review URL: http://codereview.chromium.org/8413019

This fixes part of 2011-3895

bigned-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 68226ed9ecef675895dc55a0c58d587014639a0e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbisdec: Make sure blocksize is not set to an invalid value.
Michael Niedermayer [Wed, 4 Jan 2012 18:22:20 +0000 (19:22 +0100)]
vorbisdec: Make sure blocksize is not set to an invalid value.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovorbis: Fix last quarter of CVE-2011-3893
Michael Niedermayer [Wed, 4 Jan 2012 16:29:34 +0000 (17:29 +0100)]
vorbis: Fix last quarter of CVE-2011-3893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoogg: Avoid the possibility to read out-of-bounds of a static global array in Vorbis
Chris Evans [Wed, 4 Jan 2012 16:24:15 +0000 (17:24 +0100)]
ogg: Avoid the possibility to read out-of-bounds of a static global array in Vorbis
decoding.

BUG=100543
Review URL: http://codereview.chromium.org/8365014
This fixes 25% of CVE-2011-3893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomkv: Fix a bug where a pointer was cached to an array that might later move due to
Chris Evans [Wed, 4 Jan 2012 15:33:34 +0000 (16:33 +0100)]
mkv: Fix a bug where a pointer was cached to an array that might later move due to
a realloc()

BUG=100492
Review URL: http://codereview.chromium.org/8366004
Fixes: 1 of 2 for CVE-2011-3893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFix possible infinite loop decoding als.
Philippe Saint-Pierre [Wed, 4 Jan 2012 20:00:06 +0000 (21:00 +0100)]
Fix possible infinite loop decoding als.

Reviewed-by: Thilo Borgmann
(cherry picked from commit f0f2babca23a3d099bcd5a1e18cf5d0eae2f4ef3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: Fix vlc table check for progressive jpegs.
Michael Niedermayer [Tue, 3 Jan 2012 05:53:18 +0000 (06:53 +0100)]
jpegdec: Fix vlc table check for progressive jpegs.

Fixes Ticket834

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoelectronicarts: Pass error through ea_read_header().
Michael Niedermayer [Wed, 4 Jan 2012 03:02:22 +0000 (04:02 +0100)]
electronicarts: Pass error through ea_read_header().

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoelectronicarts: Fix division by zero. Fixes Ticket #793
Oana Stratulat [Wed, 4 Jan 2012 01:13:27 +0000 (03:13 +0200)]
electronicarts: Fix division by zero. Fixes Ticket #793

Signed-off-by: Oana Stratulat <oanaandreeastratulat@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0d3a51e5d279dd2a56c81ba7a81a70128c5a7545)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRevert "wavpack: Clip samples after shifting"
Carl Eugen Hoyos [Wed, 4 Jan 2012 19:34:45 +0000 (20:34 +0100)]
Revert "wavpack: Clip samples after shifting"

This reverts commit 8d055e9079f151f13d34e8e04f4aa7ca0273c448.

The original commit introduced ticket #871, do not import the problem
into the release branch.

7 years agovf_drawtext: select YUV color for drawbox() in case YUV colorspace is used
Stefano Sabatini [Sat, 24 Dec 2011 15:17:18 +0000 (16:17 +0100)]
vf_drawtext: select YUV color for drawbox() in case YUV colorspace is used

Fix box alpha rendering when a YUV colorspace is selected, in particular
fix trac ticket #763.
(cherry picked from commit 1858a5c25ee1ccb8089339d20138116a46cc6c77)

7 years agowavpack: determine sample_fmt before requesting a buffer
Hendrik Leppkes [Fri, 16 Dec 2011 21:41:29 +0000 (22:41 +0100)]
wavpack: determine sample_fmt before requesting a buffer

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 14165fe1256e0f11ba3d9cf574492ae528e5c9cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAdded yuva420p decoding support for libopenjpeg
Michael Bradshaw [Fri, 2 Dec 2011 21:39:26 +0000 (14:39 -0700)]
Added yuva420p decoding support for libopenjpeg

Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2ba3416362345f275c63e70f44f4cfbf9b66fb35)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAdded RGBA and YUV440 decoding support for libopenjpeg decoder
Michael Bradshaw [Thu, 1 Dec 2011 04:44:41 +0000 (21:44 -0700)]
Added RGBA and YUV440 decoding support for libopenjpeg decoder

Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3f07ef1dfff036a6b35c1605e6346bad2e17da68)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoFixed openjpeg decoding bug with width/linesize issue
Michael Bradshaw [Sat, 3 Dec 2011 19:14:03 +0000 (12:14 -0700)]
Fixed openjpeg decoding bug with width/linesize issue

The original code wasn't taking into account the fact that linesize may not equal the frame's width.  This is to correct that.

Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1669e5fe3d61dc4181f96138eb4355aaaf231ea)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: non interleaved rgb ljpeg support.
Michael Niedermayer [Mon, 2 Jan 2012 18:06:46 +0000 (19:06 +0100)]
jpegdec: non interleaved rgb ljpeg support.

Fixes Ticket856

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: 9-16 bit yuv/gray ljpeg support.
Michael Niedermayer [Mon, 2 Jan 2012 16:03:24 +0000 (17:03 +0100)]
jpegdec: 9-16 bit yuv/gray ljpeg support.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojpegdec: Only enable rgb mode when there are 3 components.
Michael Niedermayer [Mon, 2 Jan 2012 16:02:41 +0000 (17:02 +0100)]
jpegdec: Only enable rgb mode when there are 3 components.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobmv audio: implement new audio decoding API
Justin Ruggles [Sat, 31 Dec 2011 20:47:30 +0000 (15:47 -0500)]
bmv audio: implement new audio decoding API
(cherry picked from commit 8893fbdf7a5b941ce353fd560817ae6a2c34cfff)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoy41p encoder and decoder
Paul B Mahol [Sun, 1 Jan 2012 12:16:42 +0000 (12:16 +0000)]
y41p encoder and decoder

y41p is a packed 12-bit 4:1:1 YUV format used by Brooktree.

Fixes issue 1123 / ticket #102.

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

Conflicts:

Changelog
libavcodec/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoj2kdec: av_log formatting use %tx instead of %x
Jean First [Sun, 1 Jan 2012 21:08:17 +0000 (22:08 +0100)]
j2kdec: av_log formatting use %tx instead of %x

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b1031562351d81fb56f9338df5876dc2153d9f26)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoUpdate copyright year.
Carl Eugen Hoyos [Sun, 1 Jan 2012 04:04:25 +0000 (05:04 +0100)]
Update copyright year.
(cherry picked from commit 8dc973e6d1442e6427dfcb9817f9d15695555465)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegpsenc: Fix integer overflow of the muxrate calculation.
Michael Niedermayer [Sun, 1 Jan 2012 02:46:06 +0000 (03:46 +0100)]
mpegpsenc: Fix integer overflow of the muxrate calculation.

this should fix the failure of h264-bsf-mp4toannexb on freebsd/openbsd

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAvoid uninitialized data in lcldec when ofs is 0 in MSZH.
Reimar Döffinger [Fri, 30 Dec 2011 09:42:55 +0000 (10:42 +0100)]
Avoid uninitialized data in lcldec when ofs is 0 in MSZH.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 42a1f1d7a8cf67eed68db596d6a1e53c0c36e4ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: ffio_limit(), treat avio_size()==0 as error.
Michael Niedermayer [Sat, 31 Dec 2011 14:27:51 +0000 (15:27 +0100)]
lavf: ffio_limit(), treat avio_size()==0 as error.

This works around issues arising from inputs that claim to have a
filesize of 0.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoflvdec: Check avpriv_mpeg4audio_get_config() return
Michael Niedermayer [Sat, 31 Dec 2011 02:39:22 +0000 (03:39 +0100)]
flvdec: Check avpriv_mpeg4audio_get_config() return

value before using its output.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocache: use av_freep instead of av_free in cache_open
Jean First [Fri, 30 Dec 2011 20:08:01 +0000 (21:08 +0100)]
cache: use av_freep instead of av_free in cache_open

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 576ada791a5085b7427c9062ba4f65e811914bd0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomlp_parser: Fix infinite loop with 0 bytes_left.
Michael Niedermayer [Thu, 29 Dec 2011 20:26:30 +0000 (21:26 +0100)]
mlp_parser: Fix infinite loop with 0 bytes_left.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAvoid av_memcpy_backptr hang without extra branch.
Reimar Döffinger [Fri, 30 Dec 2011 09:37:33 +0000 (10:37 +0100)]
Avoid av_memcpy_backptr hang without extra branch.

This only happens for a "back" value of 0 which is invalid anyway,
but lcldec does not properly validate input.
Also extend the documentation to specify valid values.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 874da652b307fe0d2bec08fc5916a9a82537f40c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoljpegdec: fix point transform injection.
Michael Niedermayer [Fri, 30 Dec 2011 04:12:38 +0000 (05:12 +0100)]
ljpegdec: fix point transform injection.
Fix Ticket842

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoflvdec: Check index for being valid
Michael Niedermayer [Thu, 29 Dec 2011 22:22:41 +0000 (23:22 +0100)]
flvdec: Check index for being valid
Fixes seeking in Enigma_Principles_of_Lust.flv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agonsvdec: Check av_malloc(string_size)
Michael Niedermayer [Thu, 29 Dec 2011 20:31:22 +0000 (21:31 +0100)]
nsvdec: Check av_malloc(string_size)

This can easily be NULL as string_size can be 2g in a damaged file.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>