45151 Commits

Author SHA1 Message Date
Michael Niedermayer
534c0df6e0 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>
2013-03-03 02:41:19 +01:00
Michael Niedermayer
f62537d9f1 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>
2013-03-03 02:41:12 +01:00
Michael Niedermayer
4f873341b4 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>
2013-03-03 02:41:07 +01:00
Carl Eugen Hoyos
857a037945 Require at least three frames to autodetect loas.
(cherry picked from commit a60530e3ee1d9532c026a52b03661f88e163d647)
2013-03-02 02:05:02 +01:00
Nicolas George
8ffe243c85 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)
2013-03-01 08:56:06 +01:00
James Almer
62e5503407 lavc/bink: Chech for malloc failure
Based on commit 8ab2173ed141aa2c3336be7f9880340dfb8dcf5e
2013-02-25 05:51:25 -03:00
James Almer
e6324ccfbd latmenc: Check for LOAS sync word
Write the packet unaltered if found.

Fixes ticket #1917

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b454c64e0311d813fef9c22cf34f83c2ce77ab23)
2013-02-25 05:48:14 -03:00
Michael Niedermayer
8cfd33fd35 doc/APIchanges: List merge commit hashes and version numbers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-25 05:19:34 +01:00
Michael Niedermayer
ab70fa28f6 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>
2013-02-25 05:19:34 +01:00
Michael Niedermayer
3a21007e47 apichanges: Use , instead of / to seperate multiple hashes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 33d6330652c088dadde163da569b1a2f6c7603c0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-25 05:19:34 +01:00
Michael Niedermayer
5877811b0f apichanges: fix date
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ad6802f975a91bf6757fe3729ef8c6f10e6796b7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-25 05:19:34 +01:00
Michael Niedermayer
c69709571a doc/APIchanges: fix odd .01 versions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f16cb9e50a5a196af9244dc7d33ed193227528a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-25 05:19:34 +01:00
Michael Niedermayer
97a740acc5 aac: reconfigure output on pop
Fixes Ticket1918

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-25 05:19:34 +01:00
Diego Biurrun
02f241d1ed 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>
2013-02-25 04:49:46 +01:00
Michael Niedermayer
cc64871bd8 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/fate/vsynth1-mpeg4
	tests/ref/fate/vsynth2-mpeg4
	tests/ref/lavf/mov
	tests/ref/seek/lavf_mov
	tests/ref/vsynth/vsynth1-dnxhd-1080i
	tests/ref/vsynth/vsynth2-dnxhd-1080i
2013-02-25 04:49:46 +01:00
Michael Niedermayer
fcd0e3235a h264: Detect POC inconsistencies and try to handle them reasonably
Improves the file from Ticket2050

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-25 04:49:46 +01:00
Carl Eugen Hoyos
4c2b6ce26c Fix bits_per_coded_sample when encoding png with frame-level multithreading.
Fixes ticket #2290.
(cherry picked from commit c4dc6c4c86a052b7ba53fa7ae0c1b0643ad70d0b)

Conflicts:
	libavcodec/pngenc.c
2013-02-21 08:59:38 +01:00
Carl Eugen Hoyos
98d06b046d 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)
2013-02-17 20:33:07 +01:00
Carl Eugen Hoyos
397e769f74 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/fate/vsynth1-avui
	tests/ref/fate/vsynth1-dnxhd-1080i
	tests/ref/fate/vsynth1-mpeg4
	tests/ref/fate/vsynth2-avui
	tests/ref/fate/vsynth2-dnxhd-1080i
	tests/ref/fate/vsynth2-mpeg4
	tests/ref/lavf/mov
	tests/ref/seek/lavf_mov
2013-02-14 15:24:13 +01:00
Carl Eugen Hoyos
140ca8f6c0 sws: dont write out of array on bigendian
Fixes Ticket2229

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e2c63685e031e28d2296cff76473b963ee62ba1)
2013-02-14 14:39:21 +01:00
Michael Niedermayer
169d849344 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)
2013-02-14 09:23:41 +01:00
Michael Niedermayer
9c659b3a67 h264_refs: Print default in case we are missing a reference.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a39d36146a40cb52b3560fd02c73eccf72603b8f)
2013-02-14 09:23:35 +01:00
Michael Niedermayer
1690c1fa88 update for 1.0.4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n1.0.4
2013-02-07 01:24:35 +01:00
Michael Niedermayer
3f27158040 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>
2013-02-07 01:00:02 +01:00
Michael Niedermayer
c459c7b23e 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>
2013-02-07 01:00:02 +01:00
Michael Niedermayer
08e2c7a45f 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>
2013-02-07 01:00:02 +01:00
Michael Niedermayer
89e16e675d 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>
2013-02-07 01:00:02 +01:00
Michael Niedermayer
4cd1dad91a avcodec_decode_audio: do not trust the channel layout, use the channel count.
Fixes memory corruption

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

Conflicts:

	libavcodec/utils.c
2013-02-07 01:00:02 +01:00
Michael Niedermayer
3e196e4def error_concealment: Check that the picture is not in a half setup state.
Fixes state becoming inconsistent
Fixes a null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-07 01:00:02 +01:00
Michael Niedermayer
2502914c5f atrac3dec: Check coding mode against channels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 13451f5520ce6b0afde861b2285dda659f8d4fb4)

Conflicts:

	libavcodec/atrac3.c
2013-02-07 01:00:02 +01:00
Michael Niedermayer
6df0d3e291 alsdec: check block length
Fix writing over the end

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-07 01:00:02 +01:00
Michael Niedermayer
85a14dbd5d adpcm: fix off by 1 error and out of array access in DK4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f18c873ab5ee3c78d00fdcc2582b39c133faecb4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-07 01:00:02 +01:00
Michael Niedermayer
db0f7f7394 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>
2013-02-07 01:00:01 +01:00
Michael Niedermayer
b666debffe 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>
2013-02-07 01:00:01 +01:00
Xi Wang
c3744b415a 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>
2013-02-07 01:00:01 +01:00
Xi Wang
7df878ac15 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>
2013-02-07 01:00:01 +01:00
Xi Wang
bc58fe0309 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>
2013-02-07 01:00:01 +01:00
Michael Niedermayer
8eda888683 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>
2013-02-07 01:00:01 +01:00
Matthieu Bouron
f3144b0cc6 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)
2013-02-06 23:29:30 +01:00
Michael Niedermayer
86f072ceb3 ffmpeg: dont allow -flags to override -pass
Fixes Ticket2154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ccf9dd00da055e94117b56cead4af80ff331b00e)
2013-02-06 10:12:20 +01:00
Michael Niedermayer
21185028b4 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)
2013-02-06 00:17:23 +01:00
Michael Niedermayer
0c2a350762 movtextenc: fix pointer messup and out of array accesses
Fixes Ticket2213

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b0635e2fcf80717dd618ef75d3317d62ed85c300)
2013-02-06 00:16:04 +01:00
Carl Eugen Hoyos
299dc3baea Do not change codec in flv streams if the user has forced a codec.
Fixes ticket #2218.
(cherry picked from commit 6a50e8a190bc1329fd3e76e8497bb7f870b6e69b)
2013-02-01 23:42:12 +01:00
Carl Eugen Hoyos
5c1a1b47f3 doc/muxers.texi: Fix mp3 picture attachment documentation.
(cherry picked from commit 99eedfc40086972987aa27df8b1259c8bf15b20c)
2013-02-01 17:57:19 +01:00
Peter Ross
4f8b7eb87f wtvdec: demux thumbnail picture to AVStream.attached_pic
Fixes ticket #2133.

(cherry picked from commit 508836932fcbc3c109fcc4df7a2f2b0bf21bbece)
2013-01-30 09:53:49 +01:00
Carl Eugen Hoyos
d807022283 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)
2013-01-24 02:34:16 +01:00
Michael Niedermayer
f7bf3becf6 Update for 1.0.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n1.0.3
2013-01-21 23:27:18 +01:00
Michael Niedermayer
7ca4b91898 h264: fix use of uninitialized variable
Fixed CID968588

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 23:19:49 +01:00
Michael Niedermayer
75aa373bec h264: print mismatching opcode details in check_opcodes()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dcbe15813ed09cf491e75a21cce0e751f5bc2b34)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 23:16:14 +01:00
Michael Niedermayer
bec97981ba h264/ff_generate_sliding_window_mmcos: fix use of uninitialized variable
Fixes CID968587
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3fba3e79a3e46d7611817f9051b33885eb1ff962)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 23:16:06 +01:00